{"openapi":"3.1.0","info":{"title":"GearDex Studio Agent API","version":"1.0.0","description":"Scoped API for GearDex Studio users. Authenticate with a Studio API key from Settings > API & Agents."},"servers":[{"url":"https://www.geardex.app"},{"url":"https://geardex.app"}],"security":[{"BearerAuth":[]}],"tags":[{"name":"Gear"},{"name":"Shoots"},{"name":"Maintenance"},{"name":"Documents"},{"name":"Analytics"},{"name":"Profile"},{"name":"Lending"},{"name":"Bookings"},{"name":"Jobs"},{"name":"Money"},{"name":"Clients"}],"paths":{"/api/studio-agent/v1/gear":{"get":{"tags":["Gear"],"summary":"List gear inventory","parameters":[{"name":"type","in":"query","schema":{"type":"string","enum":["all","camera","lens","accessory","filter","drone"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}},{"name":"q","in":"query","schema":{"type":"string","maxLength":100}}],"responses":{"200":{"description":"gear list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Gear"}},"pagination":{"type":"object","properties":{"limit":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0},"returned":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"type":{"type":"string","enum":["all","camera","lens","accessory","filter","drone"]},"maybeTruncated":{"type":"boolean"}},"required":["limit","offset","returned","total"]}},"required":["data","pagination"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_gear","x-required-scopes":["gear:read"],"description":"Requires `gear:read`."},"post":{"tags":["Gear"],"summary":"Create a gear item","description":"Requires `gear:write`. Requires `gear:write`. Creates one gear inventory record for the API key owner and emits `gear.created` webhooks for matching endpoints.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGearRequest"}}}},"responses":{"201":{"description":"Gear created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Gear"}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_gear","x-required-scopes":["gear:write"]}},"/api/studio-agent/v1/gear/{id}":{"patch":{"tags":["Gear"],"summary":"Update a gear item","description":"Requires `gear:write`. Requires `gear:write`. Updates one owned gear inventory record and emits `gear.updated` webhooks for matching endpoints.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGearRequest"}}}},"responses":{"200":{"description":"Gear updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Gear"}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"patch_gear_id","x-required-scopes":["gear:write"]},"delete":{"tags":["Gear"],"summary":"Delete a gear item","description":"Requires `gear:write`. Requires `gear:write`. Deletes one owned gear inventory record, removes related records, and emits `gear.deleted` webhooks for matching endpoints.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"gear_type","in":"query","required":true,"schema":{"type":"string","enum":["camera","lens","accessory","filter","drone"]}}],"responses":{"200":{"description":"Gear deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/Gear"}},"required":["success","data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"delete_gear_id","x-required-scopes":["gear:write"]},"get":{"tags":["Gear"],"summary":"Get one gear item","description":"Requires `gear:read`. Specs, insurance cover, kits, upcoming reservations and open flags.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"gear_type","in":"query","required":true,"schema":{"type":"string","enum":["camera","lens","accessory","filter","drone"]}}],"responses":{"200":{"description":"The item","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"brand":{"type":["string","null"]},"model":{"type":["string","null"]},"status":{"type":["string","null"]},"condition":{"type":["string","null"]},"purchase_price":{"type":["number","null"]},"purchase_date":{"type":["string","null"],"format":"date"},"shutter_count":{"type":["integer","null"],"description":"Cameras only"},"shutter_count_read_on":{"type":["string","null"],"format":"date"},"rated_shutter_life":{"type":["integer","null"]},"incident":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["lost","stolen"]},"occurred_on":{"type":"string","format":"date"}}},"has_photo":{"type":"boolean"},"category":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"location":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"insurance":{"type":"object","properties":{"value":{"type":["number","null"]},"estimated":{"type":"boolean"},"basis":{"type":"string"},"included":{"type":"boolean"},"specified":{"type":"boolean"},"covered":{"type":"boolean"},"policies":{"type":"array","items":{"type":"object"}}}},"kits":{"type":"array","items":{"type":"object"}},"upcoming_reservations":{"type":"array","items":{"type":"object"}},"open_flags":{"type":"integer","minimum":0}},"required":["id"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_gear_id","x-required-scopes":["gear:read"]}},"/api/studio-agent/v1/shoots":{"get":{"tags":["Shoots"],"summary":"List shoots","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["planning","confirmed","completed","cancelled"]}},{"name":"fromDate","in":"query","schema":{"type":"string","format":"date"}},{"name":"toDate","in":"query","schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}},{"name":"q","in":"query","schema":{"type":"string","maxLength":100}}],"responses":{"200":{"description":"shoots list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Shoot"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"filters":{"type":"object","additionalProperties":{"type":["string","null"]}}},"required":["data","pagination"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_shoots","x-required-scopes":["shoots:read"],"description":"Requires `shoots:read`."},"post":{"tags":["Shoots"],"summary":"Create a shoot plan","description":"Requires `shoots:write`. Requires `shoots:write`. Creates a planning-state shoot for the API key owner and emits `shoot.created` webhooks for matching endpoints.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShootRequest"}}}},"responses":{"201":{"description":"Shoot created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Shoot"}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_shoots","x-required-scopes":["shoots:write"]}},"/api/studio-agent/v1/shoots/{id}":{"patch":{"tags":["Shoots"],"summary":"Update a shoot plan","description":"Requires `shoots:write`. Requires `shoots:write`. Updates one owned shoot plan, validates date/time ranges, preserves gear reservation conflict checks, and emits `shoot.updated` webhooks for matching endpoints.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateShootRequest"}}}},"responses":{"200":{"description":"Shoot updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Shoot"}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"patch_shoots_id","x-required-scopes":["shoots:write"]},"delete":{"tags":["Shoots"],"summary":"Delete a shoot plan","description":"Requires `shoots:write`. Requires `shoots:write`. Deletes one owned shoot plan and emits `shoot.deleted` webhooks for matching endpoints.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Shoot deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/Shoot"}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"delete_shoots_id","x-required-scopes":["shoots:write"]}},"/api/studio-agent/v1/maintenance":{"get":{"tags":["Maintenance"],"summary":"List maintenance records","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["scheduled","in_progress","completed","cancelled"]}},{"name":"fromDate","in":"query","schema":{"type":"string","format":"date"}},{"name":"toDate","in":"query","schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}},{"name":"q","in":"query","schema":{"type":"string","maxLength":100}}],"responses":{"200":{"description":"maintenance list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Maintenance"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"filters":{"type":"object","additionalProperties":{"type":["string","null"]}}},"required":["data","pagination"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_maintenance","x-required-scopes":["maintenance:read"],"description":"Requires `maintenance:read`."},"post":{"tags":["Maintenance"],"summary":"Create a maintenance record","description":"Requires `maintenance:write`. Requires `maintenance:write`. Creates one maintenance record for an owned gear item and emits `maintenance.created` webhooks for matching endpoints.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMaintenanceRequest"}}}},"responses":{"201":{"description":"Maintenance record created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Maintenance"}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_maintenance","x-required-scopes":["maintenance:write"]}},"/api/studio-agent/v1/maintenance/{id}":{"patch":{"tags":["Maintenance"],"summary":"Update a maintenance record","description":"Requires `maintenance:write`. Requires `maintenance:write`. Updates one owned maintenance record, verifies any gear reference still belongs to the API key owner, and emits `maintenance.updated` webhooks for matching endpoints.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMaintenanceRequest"}}}},"responses":{"200":{"description":"Maintenance record updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Maintenance"}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"patch_maintenance_id","x-required-scopes":["maintenance:write"]},"delete":{"tags":["Maintenance"],"summary":"Delete a maintenance record","description":"Requires `maintenance:write`. Requires `maintenance:write`. Deletes one owned maintenance record and emits `maintenance.deleted` webhooks for matching endpoints.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Maintenance record deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/Maintenance"}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"delete_maintenance_id","x-required-scopes":["maintenance:write"]}},"/api/studio-agent/v1/documents":{"get":{"tags":["Documents"],"summary":"List documents","parameters":[{"name":"documentType","in":"query","schema":{"type":"string","enum":["receipt","warranty","insurance","user_manual"]}},{"name":"gearItemType","in":"query","schema":{"type":"string","enum":["camera","lens","accessory","filter","drone"]}},{"name":"warrantyStatus","in":"query","schema":{"type":"string","enum":["expired","critical","urgent","warning","active"]}},{"name":"fromDate","in":"query","schema":{"type":"string","format":"date"}},{"name":"toDate","in":"query","schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}},{"name":"q","in":"query","schema":{"type":"string","maxLength":100}}],"responses":{"200":{"description":"documents list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"filters":{"type":"object","additionalProperties":{"type":["string","null"]}}},"required":["data","pagination"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_documents","x-required-scopes":["documents:read"],"description":"Requires `documents:read`."}},"/api/studio-agent/v1/analytics":{"get":{"tags":["Analytics"],"summary":"Get aggregate analytics summary","responses":{"200":{"description":"Analytics summary","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Analytics"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_analytics","x-required-scopes":["analytics:read"],"description":"Requires `analytics:read`."}},"/api/studio-agent/v1/profile":{"get":{"tags":["Profile"],"summary":"Get account and studio profile metadata","description":"Requires `profile:read`. Returns the user's profile including `locale` (IETF BCP 47 tag, e.g. `en-US`, `nl-NL`, `de-DE`), `currency` (ISO 4217), and `timezone` (IANA). Agents should use `locale` + `currency` with `Intl.DateTimeFormat` / `Intl.NumberFormat` when rendering dates and amounts back to the user so output matches their regional conventions.","responses":{"200":{"description":"Profile response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"profile":{"type":"object","properties":{"id":{"type":"string"},"full_name":{"type":["string","null"]},"email":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"country":{"type":["string","null"]},"currency":{"type":["string","null"],"description":"ISO 4217 code, e.g. USD, EUR, GBP"},"locale":{"type":["string","null"],"description":"IETF BCP 47 tag, e.g. en-US, nl-NL"},"timezone":{"type":["string","null"],"description":"IANA timezone, e.g. America/New_York"},"subscription_tier":{"type":["string","null"]},"subscription_status":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"studioProfile":{"type":["object","null"]}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_profile","x-required-scopes":["profile:read"]}},"/api/studio-agent/v1/loans":{"get":{"tags":["Lending"],"summary":"List loans","description":"Requires `loans:read`. Requires `loans:read`. Each loan lists its items.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["open","returned","cancelled","all"],"default":"open"}},{"name":"borrower","in":"query","schema":{"type":"string","maxLength":100}},{"name":"gear_type","in":"query","schema":{"type":"string","enum":["camera","lens","accessory","filter","drone"]}},{"name":"gear_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Loans","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_name":{"type":"string","description":"Loan title: the item, the kit, or the lead item plus a count."},"loan_type":{"type":"string","enum":["outgoing","incoming"]},"borrower_name":{"type":"string"},"borrower_email":{"type":["string","null"]},"borrower_phone":{"type":["string","null"]},"borrower_client_id":{"type":["string","null"],"format":"uuid"},"loan_date":{"type":"string","format":"date"},"due_date":{"type":"string","format":"date"},"due_time":{"type":["string","null"]},"return_date":{"type":["string","null"],"format":"date"},"status":{"type":"string","enum":["active","overdue","returned","cancelled"]},"item_count":{"type":"integer"},"deposit_amount":{"type":["number","null"]},"purpose":{"type":["string","null"]},"notes":{"type":["string","null"]},"agreement_status":{"type":"string","enum":["none","pending","signed","void"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"serial_number":{"type":["string","null"]},"value":{"type":["number","null"]},"kit_id":{"type":["string","null"],"format":"uuid"},"kit_name":{"type":["string","null"]},"status":{"type":"string","enum":["out","returned","missing"]},"returned_at":{"type":["string","null"],"format":"date-time"},"return_notes":{"type":["string","null"]},"flag_id":{"type":["string","null"],"format":"uuid"}}}}}}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_loans","x-required-scopes":["loans:read"]},"post":{"tags":["Lending"],"summary":"Check gear out","description":"Requires `loans:write`. Requires `loans:write`. One loan can hold any mix of items and kits. Blocked items return `409 conflict` with details. Emits `loan.checked_out`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"}},"required":["gear_type","gear_id"]},"maxItems":200},"kit_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":20},"consumables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"quantity":{"type":"number"}},"required":["id","quantity"]}},"borrower":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"client_id":{"type":"string","format":"uuid"}},"required":["name"]},"loan_type":{"type":"string","enum":["outgoing","incoming"],"default":"outgoing"},"loan_date":{"type":"string","format":"date"},"due_date":{"type":"string","format":"date"},"due_time":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"deposit_amount":{"type":"number"},"purpose":{"type":"string"},"notes":{"type":"string"}},"required":["borrower"],"anyOf":[{"required":["items"],"properties":{"items":{"minItems":1}}},{"required":["kit_ids"],"properties":{"kit_ids":{"minItems":1}}}]}}}},"responses":{"201":{"description":"The new loan, plus non-blocking warnings","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_name":{"type":"string","description":"Loan title: the item, the kit, or the lead item plus a count."},"loan_type":{"type":"string","enum":["outgoing","incoming"]},"borrower_name":{"type":"string"},"borrower_email":{"type":["string","null"]},"borrower_phone":{"type":["string","null"]},"borrower_client_id":{"type":["string","null"],"format":"uuid"},"loan_date":{"type":"string","format":"date"},"due_date":{"type":"string","format":"date"},"due_time":{"type":["string","null"]},"return_date":{"type":["string","null"],"format":"date"},"status":{"type":"string","enum":["active","overdue","returned","cancelled"]},"item_count":{"type":"integer"},"deposit_amount":{"type":["number","null"]},"purpose":{"type":["string","null"]},"notes":{"type":["string","null"]},"agreement_status":{"type":"string","enum":["none","pending","signed","void"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"serial_number":{"type":["string","null"]},"value":{"type":["number","null"]},"kit_id":{"type":["string","null"],"format":"uuid"},"kit_name":{"type":["string","null"]},"status":{"type":"string","enum":["out","returned","missing"]},"returned_at":{"type":["string","null"],"format":"date-time"},"return_notes":{"type":["string","null"]},"flag_id":{"type":["string","null"],"format":"uuid"}}}}}},"warnings":{"type":"array","items":{"type":"object"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_loans","x-required-scopes":["loans:write"]}},"/api/studio-agent/v1/loans/{id}":{"get":{"tags":["Lending"],"summary":"Get a loan","description":"Requires `loans:read`. Requires `loans:read`. Includes items and consumables.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Loan with items and consumables","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_name":{"type":"string","description":"Loan title: the item, the kit, or the lead item plus a count."},"loan_type":{"type":"string","enum":["outgoing","incoming"]},"borrower_name":{"type":"string"},"borrower_email":{"type":["string","null"]},"borrower_phone":{"type":["string","null"]},"borrower_client_id":{"type":["string","null"],"format":"uuid"},"loan_date":{"type":"string","format":"date"},"due_date":{"type":"string","format":"date"},"due_time":{"type":["string","null"]},"return_date":{"type":["string","null"],"format":"date"},"status":{"type":"string","enum":["active","overdue","returned","cancelled"]},"item_count":{"type":"integer"},"deposit_amount":{"type":["number","null"]},"purpose":{"type":["string","null"]},"notes":{"type":["string","null"]},"agreement_status":{"type":"string","enum":["none","pending","signed","void"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"serial_number":{"type":["string","null"]},"value":{"type":["number","null"]},"kit_id":{"type":["string","null"],"format":"uuid"},"kit_name":{"type":["string","null"]},"status":{"type":"string","enum":["out","returned","missing"]},"returned_at":{"type":["string","null"],"format":"date-time"},"return_notes":{"type":["string","null"]},"flag_id":{"type":["string","null"],"format":"uuid"}}}}}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_loans_id","x-required-scopes":["loans:read"]},"patch":{"tags":["Lending"],"summary":"Extend or cancel a loan","description":"Requires `loans:write`. Requires `loans:write`. Extending checks the new window against other holds.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["extend","cancel"]},"due_date":{"type":"string","format":"date"},"due_time":{"type":"string"}},"required":["action"]}}}},"responses":{"200":{"description":"Updated loan","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_name":{"type":"string","description":"Loan title: the item, the kit, or the lead item plus a count."},"loan_type":{"type":"string","enum":["outgoing","incoming"]},"borrower_name":{"type":"string"},"borrower_email":{"type":["string","null"]},"borrower_phone":{"type":["string","null"]},"borrower_client_id":{"type":["string","null"],"format":"uuid"},"loan_date":{"type":"string","format":"date"},"due_date":{"type":"string","format":"date"},"due_time":{"type":["string","null"]},"return_date":{"type":["string","null"],"format":"date"},"status":{"type":"string","enum":["active","overdue","returned","cancelled"]},"item_count":{"type":"integer"},"deposit_amount":{"type":["number","null"]},"purpose":{"type":["string","null"]},"notes":{"type":["string","null"]},"agreement_status":{"type":"string","enum":["none","pending","signed","void"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"serial_number":{"type":["string","null"]},"value":{"type":["number","null"]},"kit_id":{"type":["string","null"],"format":"uuid"},"kit_name":{"type":["string","null"]},"status":{"type":"string","enum":["out","returned","missing"]},"returned_at":{"type":["string","null"],"format":"date-time"},"return_notes":{"type":["string","null"]},"flag_id":{"type":["string","null"],"format":"uuid"}}}}}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"patch_loans_id","x-required-scopes":["loans:write"]}},"/api/studio-agent/v1/loans/{id}/check-in":{"post":{"tags":["Lending"],"summary":"Check gear back in","description":"Requires `loans:write`. Requires `loans:write`. Omit `items` to return everything still out. Missing items raise blocking flags. Emits `loan.returned` once nothing is out.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Loan item id"},"outcome":{"type":"string","enum":["returned","missing"]},"note":{"type":"string"}},"required":["id"]},"minItems":1},"notes":{"type":"string"},"return_date":{"type":"string","format":"date"}}}}}},"responses":{"200":{"description":"Check-in result","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_name":{"type":"string","description":"Loan title: the item, the kit, or the lead item plus a count."},"loan_type":{"type":"string","enum":["outgoing","incoming"]},"borrower_name":{"type":"string"},"borrower_email":{"type":["string","null"]},"borrower_phone":{"type":["string","null"]},"borrower_client_id":{"type":["string","null"],"format":"uuid"},"loan_date":{"type":"string","format":"date"},"due_date":{"type":"string","format":"date"},"due_time":{"type":["string","null"]},"return_date":{"type":["string","null"],"format":"date"},"status":{"type":"string","enum":["active","overdue","returned","cancelled"]},"item_count":{"type":"integer"},"deposit_amount":{"type":["number","null"]},"purpose":{"type":["string","null"]},"notes":{"type":["string","null"]},"agreement_status":{"type":"string","enum":["none","pending","signed","void"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"serial_number":{"type":["string","null"]},"value":{"type":["number","null"]},"kit_id":{"type":["string","null"],"format":"uuid"},"kit_name":{"type":["string","null"]},"status":{"type":"string","enum":["out","returned","missing"]},"returned_at":{"type":["string","null"],"format":"date-time"},"return_notes":{"type":["string","null"]},"flag_id":{"type":["string","null"],"format":"uuid"}}}}}},"complete":{"type":"boolean"},"flags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"flag_type":{"type":"string","enum":["needs_repair","damaged","missing","dirty","sensor_dust","low_battery","other"]},"note":{"type":"string"},"blocks_availability":{"type":"boolean"},"has_photo":{"type":"boolean"},"resolved_at":{"type":["string","null"],"format":"date-time"}},"required":["id"]}}},"required":["data","complete","flags"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_loans_id_check-in","x-required-scopes":["loans:write"]}},"/api/studio-agent/v1/flags":{"get":{"tags":["Lending"],"summary":"List gear flags","description":"Requires `loans:read`. Requires `loans:read`.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["open","resolved","all"],"default":"open"}},{"name":"gear_type","in":"query","schema":{"type":"string","enum":["camera","lens","accessory","filter","drone"]}},{"name":"gear_id","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Flags","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"flag_type":{"type":"string","enum":["needs_repair","damaged","missing","dirty","sensor_dust","low_battery","other"]},"note":{"type":"string"},"blocks_availability":{"type":"boolean"},"has_photo":{"type":"boolean"},"resolved_at":{"type":["string","null"],"format":"date-time"}},"required":["id"]}},"total":{"type":"integer","minimum":0},"filters":{"type":"object"}},"required":["data","total","filters"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_flags","x-required-scopes":["loans:read"]},"post":{"tags":["Lending"],"summary":"Flag an issue on gear","description":"Requires `loans:write`. Requires `loans:write`. Blocking flags move available gear to maintenance. Emits `flag.raised`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["needs_repair","damaged","missing","dirty","sensor_dust","low_battery","other"]},"note":{"type":"string","maxLength":2000},"blocks":{"type":"boolean"},"loan_id":{"type":"string","format":"uuid"}},"required":["gear_type","gear_id","type","note"]}}}},"responses":{"201":{"description":"Created flag","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"flag_type":{"type":"string","enum":["needs_repair","damaged","missing","dirty","sensor_dust","low_battery","other"]},"note":{"type":"string"},"blocks_availability":{"type":"boolean"},"has_photo":{"type":"boolean"},"resolved_at":{"type":["string","null"],"format":"date-time"}},"required":["id"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_flags","x-required-scopes":["loans:write"]}},"/api/studio-agent/v1/availability":{"get":{"tags":["Lending"],"summary":"Check availability","description":"Requires `loans:read`. Requires `loans:read`. Lists loans, holds, flags, and service that block or overlap the window.","parameters":[{"name":"gear_type","in":"query","required":true,"schema":{"type":"string","enum":["camera","lens","accessory","filter","drone"]}},{"name":"gear_id","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"start","in":"query","schema":{"type":"string","format":"date"}},{"name":"end","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Item availability","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string"},"start":{"type":"string","format":"date"},"end":{"type":"string","format":"date"},"window":{"type":"object","properties":{"start_at":{"type":"string","format":"date-time"},"end_at":{"type":"string","format":"date-time"}}},"available":{"type":"boolean"},"conflicts":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"reason":{"type":"string"},"blocking":{"type":"boolean"}},"required":["kind","reason","blocking"]}}},"required":["gear_type","gear_id","available","conflicts"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_availability","x-required-scopes":["loans:read"]}},"/api/studio-agent/v1/bookings":{"get":{"tags":["Bookings"],"summary":"List bookings","description":"Requires `bookings:read`. Requires `bookings:read`.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["requested","confirmed","cancelled","expired"]}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"bookings list","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["requested","confirmed","cancelled","expired"]},"start_at":{"type":"string","format":"date-time"},"end_at":{"type":"string","format":"date-time"},"timezone":{"type":"string"},"client_name":{"type":"string"},"client_email":{"type":["string","null"]},"shoot_id":{"type":["string","null"],"format":"uuid"},"session_type":{"type":["object","null"]}},"required":["id"]}},"total":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"required":["items","total","limit","offset"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_bookings","x-required-scopes":["bookings:read"]}},"/api/studio-agent/v1/bookings/{id}":{"patch":{"tags":["Bookings"],"summary":"Approve or decline a booking request","description":"Requires `bookings:write`. Requires `bookings:write`. Emails the client and emits `booking.confirmed` or `booking.cancelled`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["approve","decline"]}},"required":["action"]}}}},"responses":{"200":{"description":"Booking decision","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["confirmed","cancelled"]}},"required":["id"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"patch_bookings_id","x-required-scopes":["bookings:write"]}},"/api/studio-agent/v1/inquiries":{"get":{"tags":["Bookings"],"summary":"List Site inquiries","description":"Requires `bookings:read`. Requires `bookings:read`.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["new","replied","converted","archived"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"inquiries list","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["new","replied","converted","archived"]},"name":{"type":"string"},"email":{"type":["string","null"]},"message":{"type":["string","null"]},"client_id":{"type":["string","null"],"format":"uuid"}},"required":["id"]}},"total":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"required":["items","total","limit","offset"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_inquiries","x-required-scopes":["bookings:read"]}},"/api/studio-agent/v1/jobs":{"get":{"tags":["Jobs"],"summary":"List jobs","description":"Requires `shoots:read`. Requires `shoots:read` and Pro. Each job with its client, shoots, money per currency, costs, and profit.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["all","open","cancelled"]}},{"name":"client_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","schema":{"type":"string","maxLength":100}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"jobs list","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"client":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"notes":{"type":["string","null"]},"cancelled_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"shoots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"shoot_date":{"type":["string","null"],"format":"date"},"shoot_end_date":{"type":["string","null"],"format":"date"},"status":{"type":"string"}},"required":["id"]}},"money":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"invoiced":{"type":"number","description":"Amount in the record's currency units, not cents"},"collected":{"type":"number","description":"Amount in the record's currency units, not cents"},"owed":{"type":"number","description":"Amount in the record's currency units, not cents"}},"required":["currency","invoiced","collected","owed"]},"description":"Invoiced, collected and owed per currency"},"costs":{"type":"number","description":"Every expense on the job's shoots, rentals and crew pay included"},"profit":{"type":["number","null"],"description":"Collected less costs; null when the job bills in more than one currency"}},"required":["id"]}},"total":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"required":["items","total","limit","offset"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_jobs","x-required-scopes":["shoots:read"]}},"/api/studio-agent/v1/jobs/{id}":{"get":{"tags":["Jobs"],"summary":"Get a job","description":"Requires `shoots:read`. Requires `shoots:read` and Pro.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The job","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"client":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"notes":{"type":["string","null"]},"cancelled_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"shoots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"shoot_date":{"type":["string","null"],"format":"date"},"shoot_end_date":{"type":["string","null"],"format":"date"},"status":{"type":"string"}},"required":["id"]}},"money":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"invoiced":{"type":"number","description":"Amount in the record's currency units, not cents"},"collected":{"type":"number","description":"Amount in the record's currency units, not cents"},"owed":{"type":"number","description":"Amount in the record's currency units, not cents"}},"required":["currency","invoiced","collected","owed"]},"description":"Invoiced, collected and owed per currency"},"costs":{"type":"number","description":"Every expense on the job's shoots, rentals and crew pay included"},"profit":{"type":["number","null"],"description":"Collected less costs; null when the job bills in more than one currency"}},"required":["id"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_jobs_id","x-required-scopes":["shoots:read"]}},"/api/studio-agent/v1/quotes":{"get":{"tags":["Money"],"summary":"List quotes","description":"Requires `money:read`. Requires `money:read` and Studio.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["draft","sent","accepted","declined","expired"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"quotes list","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","sent","accepted","declined","expired"]},"quote_number":{"type":"string"},"client_name":{"type":"string"},"client_email":{"type":["string","null"]},"currency":{"type":"string"},"subtotal":{"type":"number","description":"Amount in the record's currency units, not cents"},"tax_rate":{"type":"number"},"tax_amount":{"type":"number","description":"Amount in the record's currency units, not cents"},"total":{"type":"number","description":"Amount in the record's currency units, not cents"},"line_items":{"type":"array","items":{"type":"object"}},"payment_schedule":{"type":"array","items":{"type":"object"}},"url":{"type":"string","format":"uri"}},"required":["id"]}},"total":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"required":["items","total","limit","offset"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_quotes","x-required-scopes":["money:read"]},"post":{"tags":["Money"],"summary":"Create a draft quote","description":"Requires `money:write`. Requires `money:write` and Studio. `payment_schedule` percentages must total 100.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"client_id":{"type":"string","format":"uuid"},"client_name":{"type":"string"},"client_email":{"type":"string","format":"email"},"line_items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"number"},"unit_price":{"type":"number"}},"required":["description","unit_price"]},"minItems":1,"maxItems":100},"tax_rate":{"type":"number"},"payment_schedule":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"percent":{"type":"integer"},"due":{"type":"string","enum":["on_accept","days_before_shoot","date"]},"days":{"type":"integer"},"date":{"type":"string","format":"date"}}}},"valid_until":{"type":"string","format":"date"},"notes":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$","description":"Defaults to the owner's currency"},"shoot_id":{"type":["string","null"],"format":"uuid"}},"required":["title","line_items"],"anyOf":[{"required":["client_id"]},{"required":["client_name"]}]}}}},"responses":{"201":{"description":"Created draft quote","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","sent","accepted","declined","expired"]},"quote_number":{"type":"string"},"client_name":{"type":"string"},"client_email":{"type":["string","null"]},"currency":{"type":"string"},"subtotal":{"type":"number","description":"Amount in the record's currency units, not cents"},"tax_rate":{"type":"number"},"tax_amount":{"type":"number","description":"Amount in the record's currency units, not cents"},"total":{"type":"number","description":"Amount in the record's currency units, not cents"},"line_items":{"type":"array","items":{"type":"object"}},"payment_schedule":{"type":"array","items":{"type":"object"}},"url":{"type":"string","format":"uri"}},"required":["id"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_quotes","x-required-scopes":["money:write"]}},"/api/studio-agent/v1/quotes/{id}/send":{"post":{"tags":["Money"],"summary":"Send a quote","description":"Requires `money:write`. Requires `money:write`. Emails the client a link to accept.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Quote sent","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sent":{"type":"boolean"},"url":{"type":"string","format":"uri"}},"required":["id"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_quotes_id_send","x-required-scopes":["money:write"]}},"/api/studio-agent/v1/invoices":{"get":{"tags":["Money"],"summary":"List invoices","description":"Requires `money:read`. Requires `money:read` and Studio. Includes installments and payments.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["draft","sent","paid","overdue","void"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"invoices list","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"invoice_number":{"type":"string"},"status":{"type":"string","enum":["draft","sent","paid","overdue","void"]},"client_name":{"type":"string"},"currency":{"type":"string"},"total":{"type":"number","description":"Amount in the record's currency units, not cents"},"amount_paid":{"type":"number","description":"Amount in the record's currency units, not cents"},"installments":{"type":"array","items":{"type":"object"}},"payments":{"type":"array","items":{"type":"object"}},"url":{"type":["string","null"],"format":"uri"}},"required":["id"]}},"total":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"required":["items","total","limit","offset"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_invoices","x-required-scopes":["money:read"]}},"/api/studio-agent/v1/invoices/{id}/payments":{"post":{"tags":["Money"],"summary":"Record a payment","description":"Requires `money:write`. Requires `money:write`. Fills installments in order, marks the invoice paid when covered (emitting `invoice.paid`), and confirms a booking waiting on this deposit.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","description":"Amount in the record's currency units, not cents","minimum":0.01,"maximum":1000000},"method":{"type":"string"},"paid_on":{"type":"string","format":"date"},"reference":{"type":"string"},"notes":{"type":"string"}},"required":["amount"]}}}},"responses":{"201":{"description":"Recorded payment","content":{"application/json":{"schema":{"type":"object","properties":{"payment":{"type":"object"},"paidCents":{"type":"integer","minimum":0},"owedCents":{"type":"integer","minimum":0},"status":{"type":"string"},"bookingConfirmed":{"type":"boolean"}},"required":["payment","paidCents","owedCents","status","bookingConfirmed"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_invoices_id_payments","x-required-scopes":["money:write"]}},"/api/studio-agent/v1/shoots/{id}/deliverables":{"get":{"tags":["Shoots"],"summary":"List a shoot's deliverables","description":"Requires `shoots:read`. Requires `shoots:read` and Studio.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deliverables","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"shoot_id":{"type":"string","format":"uuid"},"title":{"type":"string"},"kind":{"type":"string","enum":["gallery","video","prints","album","other"]},"url":{"type":["string","null"]},"gallery_id":{"type":["string","null"],"format":"uuid"},"due_date":{"type":["string","null"],"format":"date"},"delivered_at":{"type":["string","null"],"format":"date-time"},"notified_at":{"type":["string","null"],"format":"date-time"},"sort_order":{"type":"integer","minimum":0}},"required":["id"]}}},"required":["items"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_shoots_id_deliverables","x-required-scopes":["shoots:read"]},"post":{"tags":["Shoots"],"summary":"Add a deliverable","description":"Requires `shoots:write`. Requires `shoots:write` and Studio.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"kind":{"type":"string","enum":["gallery","video","prints","album","other"]},"url":{"type":"string","format":"uri"},"due_date":{"type":"string","format":"date"},"gallery_id":{"type":["string","null"],"format":"uuid"}},"required":["title"]}}}},"responses":{"201":{"description":"Created deliverable","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"shoot_id":{"type":"string","format":"uuid"},"title":{"type":"string"},"kind":{"type":"string","enum":["gallery","video","prints","album","other"]},"url":{"type":["string","null"]},"gallery_id":{"type":["string","null"],"format":"uuid"},"due_date":{"type":["string","null"],"format":"date"},"delivered_at":{"type":["string","null"],"format":"date-time"},"notified_at":{"type":["string","null"],"format":"date-time"},"sort_order":{"type":"integer","minimum":0}},"required":["id"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_shoots_id_deliverables","x-required-scopes":["shoots:write"]}},"/api/studio-agent/v1/shoots/{id}/deliverables/deliver":{"post":{"tags":["Shoots"],"summary":"Deliver to the client","description":"Requires `shoots:write`. Requires `shoots:write`. Marks deliverables delivered, optionally emails the client their links, completes the shoot once everything is delivered, and emits `deliverable.delivered`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"}},"notify":{"type":"boolean"}},"required":["ids"]}}}},"responses":{"200":{"description":"Delivery outcome","content":{"application/json":{"schema":{"type":"object","properties":{"delivered":{"type":"integer","minimum":0},"emailed":{"type":"boolean"},"emailError":{"type":["string","null"]},"completed":{"type":"boolean"},"completionError":{"type":["string","null"]}},"required":["delivered","emailed","completed"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_shoots_id_deliverables_deliver","x-required-scopes":["shoots:write"]}},"/api/studio-agent/v1/shoots/{id}/profit":{"get":{"tags":["Shoots"],"summary":"Profit for a job","description":"Requires `shoots:read`. Requires `shoots:read` and Studio. Booked and collected revenue minus expenses and gear wear.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Shoot profit","content":{"application/json":{"schema":{"type":"object","properties":{"shoot_id":{"type":"string","format":"uuid"},"booked":{"type":"number","description":"Amount in the record's currency units, not cents"},"collected":{"type":"number","description":"Amount in the record's currency units, not cents"},"expenses":{"type":"number","description":"Amount in the record's currency units, not cents"},"gear_wear":{"type":"number","description":"Amount in the record's currency units, not cents"},"profit":{"type":"number","description":"Amount in the record's currency units, not cents"},"collected_profit":{"type":"number","description":"Amount in the record's currency units, not cents"},"shoot_days":{"type":"number"},"expense_items":{"type":"array","items":{"type":"object"}}},"required":["shoot_id","booked","collected","expenses","gear_wear","profit","collected_profit"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_shoots_id_profit","x-required-scopes":["shoots:read"]}},"/api/studio-agent/v1/categories":{"get":{"tags":["Gear"],"summary":"List gear categories","description":"Requires `gear:read`. Use an id as category_id on gear writes.","responses":{"200":{"description":"Categories by name","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"color":{"type":["string","null"]},"is_default":{"type":"boolean"}},"required":["id"]}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_categories","x-required-scopes":["gear:read"]}},"/api/studio-agent/v1/locations":{"get":{"tags":["Gear"],"summary":"List storage locations","description":"Requires `gear:read`. Use an id as location_id on gear writes.","responses":{"200":{"description":"Locations by name","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"address":{"type":["string","null"]},"notes":{"type":["string","null"]},"icon":{"type":["string","null"]},"is_default":{"type":"boolean"},"has_image":{"type":"boolean"}},"required":["id"]}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_locations","x-required-scopes":["gear:read"]}},"/api/studio-agent/v1/gear/{id}/shutter-readings":{"get":{"tags":["Gear"],"summary":"List shutter readings","description":"Requires `gear:read`. The item's shutter count log, newest first.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"gear_type","in":"query","required":true,"schema":{"type":"string","enum":["camera","drone"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Readings","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_type":{"type":"string","enum":["camera","drone"]},"gear_id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"value":{"type":"integer","minimum":0},"read_on":{"type":"string","format":"date"},"source":{"type":"string","enum":["manual","photo","service"]},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}},"required":["id"]}},"pagination":{"$ref":"#/components/schemas/Pagination"},"filters":{"type":"object"},"camera":{"type":"object","properties":{"shutter_count":{"type":["integer","null"]},"shutter_count_read_on":{"type":["string","null"],"format":"date"},"rated_shutter_life":{"type":["integer","null"]}}}},"required":["data","pagination"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_gear_id_shutter-readings","x-required-scopes":["gear:read"]},"post":{"tags":["Gear"],"summary":"Log a shutter reading","description":"Requires `gear:write`. A camera's latest count follows the newest reading.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","drone"]},"value":{"type":"integer","minimum":0,"maximum":2000000000},"read_on":{"type":"string","format":"date","description":"Defaults to today"},"source":{"type":"string","enum":["manual","photo","service"],"default":"manual"},"note":{"type":["string","null"],"maxLength":500}},"required":["gear_type","value"]}}}},"responses":{"201":{"description":"The reading","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_type":{"type":"string","enum":["camera","drone"]},"gear_id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"value":{"type":"integer","minimum":0},"read_on":{"type":"string","format":"date"},"source":{"type":"string","enum":["manual","photo","service"]},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"camera":{"type":"object","properties":{"shutter_count":{"type":["integer","null"]},"shutter_count_read_on":{"type":["string","null"],"format":"date"},"rated_shutter_life":{"type":["integer","null"]}}}},"required":["id"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_gear_id_shutter-readings","x-required-scopes":["gear:write"]}},"/api/studio-agent/v1/kits":{"get":{"tags":["Gear"],"summary":"List rigs and kits","description":"Requires `gear:read`. Each with its contents and whether it is ready to go out.","parameters":[{"name":"kind","in":"query","schema":{"type":"string","enum":["rig","kit"]}},{"name":"q","in":"query","schema":{"type":"string","maxLength":100}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Rigs and kits, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"kind":{"type":"string","enum":["rig","kit"]},"weight_limit_grams":{"type":["number","null"]},"weight_unit":{"type":"string"},"is_rentable":{"type":"boolean"},"kit_fee_amount":{"type":["number","null"]},"kit_fee_period":{"type":["string","null"]},"item_count":{"type":"integer","minimum":0},"total_weight_grams":{"type":["number","null"]},"ready":{"type":"boolean","description":"Every item is available and none is lost or stolen"},"items":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"slot_type":{"type":"string"},"name":{"type":"string"},"status":{"type":["string","null"]},"weight_grams":{"type":["number","null"]},"incident":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["lost","stolen"]},"occurred_on":{"type":"string","format":"date"}}}}}},"consumables":{"type":"array","items":{"type":"object","properties":{"consumable_id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"quantity":{"type":"number"}}}}},"required":["id"]}},"pagination":{"$ref":"#/components/schemas/Pagination"},"filters":{"type":"object"}},"required":["data","pagination"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_kits","x-required-scopes":["gear:read"]},"post":{"tags":["Gear"],"summary":"Create a rig or kit","description":"Requires `gear:write`. A rig holds one body and one lens at most. Unowned gear returns `400 gear_not_found`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":["string","null"],"maxLength":2000},"kind":{"type":"string","enum":["rig","kit"],"default":"kit"},"items":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"}},"required":["gear_type","gear_id"]},"maxItems":100}},"required":["name"]}}}},"responses":{"201":{"description":"The new kit","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"kind":{"type":"string","enum":["rig","kit"]},"weight_limit_grams":{"type":["number","null"]},"weight_unit":{"type":"string"},"is_rentable":{"type":"boolean"},"kit_fee_amount":{"type":["number","null"]},"kit_fee_period":{"type":["string","null"]},"item_count":{"type":"integer","minimum":0},"total_weight_grams":{"type":["number","null"]},"ready":{"type":"boolean","description":"Every item is available and none is lost or stolen"},"items":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"slot_type":{"type":"string"},"name":{"type":"string"},"status":{"type":["string","null"]},"weight_grams":{"type":["number","null"]},"incident":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["lost","stolen"]},"occurred_on":{"type":"string","format":"date"}}}}}},"consumables":{"type":"array","items":{"type":"object","properties":{"consumable_id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"quantity":{"type":"number"}}}}},"required":["id"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_kits","x-required-scopes":["gear:write"]}},"/api/studio-agent/v1/kits/{id}":{"get":{"tags":["Gear"],"summary":"Get a rig or kit","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The kit","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"kind":{"type":"string","enum":["rig","kit"]},"weight_limit_grams":{"type":["number","null"]},"weight_unit":{"type":"string"},"is_rentable":{"type":"boolean"},"kit_fee_amount":{"type":["number","null"]},"kit_fee_period":{"type":["string","null"]},"item_count":{"type":"integer","minimum":0},"total_weight_grams":{"type":["number","null"]},"ready":{"type":"boolean","description":"Every item is available and none is lost or stolen"},"items":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"slot_type":{"type":"string"},"name":{"type":"string"},"status":{"type":["string","null"]},"weight_grams":{"type":["number","null"]},"incident":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["lost","stolen"]},"occurred_on":{"type":"string","format":"date"}}}}}},"consumables":{"type":"array","items":{"type":"object","properties":{"consumable_id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"quantity":{"type":"number"}}}}},"required":["id"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_kits_id","x-required-scopes":["gear:read"],"description":"Requires `gear:read`."},"patch":{"tags":["Gear"],"summary":"Update a rig or kit","description":"Requires `gear:write`. Rename it, describe it, or add and remove gear. Removals apply first.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":["string","null"],"maxLength":2000},"add_items":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"}},"required":["gear_type","gear_id"]},"maxItems":100},"remove_items":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"}},"required":["gear_type","gear_id"]},"maxItems":100}},"minProperties":1}}}},"responses":{"200":{"description":"The updated kit","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"kind":{"type":"string","enum":["rig","kit"]},"weight_limit_grams":{"type":["number","null"]},"weight_unit":{"type":"string"},"is_rentable":{"type":"boolean"},"kit_fee_amount":{"type":["number","null"]},"kit_fee_period":{"type":["string","null"]},"item_count":{"type":"integer","minimum":0},"total_weight_grams":{"type":["number","null"]},"ready":{"type":"boolean","description":"Every item is available and none is lost or stolen"},"items":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"slot_type":{"type":"string"},"name":{"type":"string"},"status":{"type":["string","null"]},"weight_grams":{"type":["number","null"]},"incident":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["lost","stolen"]},"occurred_on":{"type":"string","format":"date"}}}}}},"consumables":{"type":"array","items":{"type":"object","properties":{"consumable_id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"quantity":{"type":"number"}}}}},"required":["id"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"patch_kits_id","x-required-scopes":["gear:write"]},"delete":{"tags":["Gear"],"summary":"Delete a rig or kit","description":"Requires `gear:write`. The gear stays in the library.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The deleted kit","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"kind":{"type":"string","enum":["rig","kit"]},"weight_limit_grams":{"type":["number","null"]},"weight_unit":{"type":"string"},"is_rentable":{"type":"boolean"},"kit_fee_amount":{"type":["number","null"]},"kit_fee_period":{"type":["string","null"]},"item_count":{"type":"integer","minimum":0},"total_weight_grams":{"type":["number","null"]},"ready":{"type":"boolean","description":"Every item is available and none is lost or stolen"},"items":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"slot_type":{"type":"string"},"name":{"type":"string"},"status":{"type":["string","null"]},"weight_grams":{"type":["number","null"]},"incident":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["lost","stolen"]},"occurred_on":{"type":"string","format":"date"}}}}}},"consumables":{"type":"array","items":{"type":"object","properties":{"consumable_id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"quantity":{"type":"number"}}}}},"required":["id"]}},"required":["success","data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"delete_kits_id","x-required-scopes":["gear:write"]}},"/api/studio-agent/v1/incidents":{"get":{"tags":["Gear"],"summary":"List lost and stolen reports","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["open","all"],"default":"open"}},{"name":"gear_type","in":"query","schema":{"type":"string","enum":["camera","lens","accessory","filter","drone"]}},{"name":"gear_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Reports, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"gear_name":{"type":["string","null"]},"kind":{"type":"string","enum":["lost","stolen"]},"open":{"type":"boolean"},"occurred_on":{"type":"string","format":"date"},"place":{"type":["string","null"]},"police_report_number":{"type":["string","null"]},"insurer_claim_number":{"type":["string","null"]},"notes":{"type":["string","null"]},"recovered_on":{"type":["string","null"],"format":"date"},"recovered_note":{"type":["string","null"]}},"required":["id"]}},"pagination":{"$ref":"#/components/schemas/Pagination"},"filters":{"type":"object"}},"required":["data","pagination"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_incidents","x-required-scopes":["gear:read"],"description":"Requires `gear:read`."},"post":{"tags":["Gear"],"summary":"Report gear lost or stolen","description":"Requires `gear:write`. One open report per item. The item can't go out until it is recovered.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["lost","stolen"]},"occurred_on":{"type":"string","format":"date"},"place":{"type":["string","null"],"maxLength":300},"police_report_number":{"type":["string","null"],"maxLength":120},"insurer_claim_number":{"type":["string","null"],"maxLength":120},"notes":{"type":["string","null"],"maxLength":4000}},"required":["gear_type","gear_id","kind","occurred_on"]}}}},"responses":{"201":{"description":"The report","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"gear_name":{"type":["string","null"]},"kind":{"type":"string","enum":["lost","stolen"]},"open":{"type":"boolean"},"occurred_on":{"type":"string","format":"date"},"place":{"type":["string","null"]},"police_report_number":{"type":["string","null"]},"insurer_claim_number":{"type":["string","null"]},"notes":{"type":["string","null"]},"recovered_on":{"type":["string","null"],"format":"date"},"recovered_note":{"type":["string","null"]}},"required":["id"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_incidents","x-required-scopes":["gear:write"]}},"/api/studio-agent/v1/incidents/{id}":{"patch":{"tags":["Gear"],"summary":"Recover or update a report","description":"Requires `gear:write`. `recover` closes the report; `update` fills in the place, police report and claim numbers.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"action":{"const":"recover"},"recovered_on":{"type":"string","format":"date"},"note":{"type":["string","null"],"maxLength":2000}},"required":["action","recovered_on"]},{"type":"object","properties":{"action":{"const":"update"},"place":{"type":["string","null"],"maxLength":300},"police_report_number":{"type":["string","null"],"maxLength":120},"insurer_claim_number":{"type":["string","null"],"maxLength":120},"notes":{"type":["string","null"],"maxLength":4000}},"required":["action"]}]}}}},"responses":{"200":{"description":"The report","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"gear_name":{"type":["string","null"]},"kind":{"type":"string","enum":["lost","stolen"]},"open":{"type":"boolean"},"occurred_on":{"type":"string","format":"date"},"place":{"type":["string","null"]},"police_report_number":{"type":["string","null"]},"insurer_claim_number":{"type":["string","null"]},"notes":{"type":["string","null"]},"recovered_on":{"type":["string","null"],"format":"date"},"recovered_note":{"type":["string","null"]}},"required":["id"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"patch_incidents_id","x-required-scopes":["gear:write"]}},"/api/studio-agent/v1/flags/{id}":{"patch":{"tags":["Lending"],"summary":"Resolve a flag","description":"Requires `loans:write`. The gear goes back into rotation when nothing else holds it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"const":"resolve"},"note":{"type":["string","null"],"maxLength":2000}},"required":["action"]}}}},"responses":{"200":{"description":"The resolved flag","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"flag_type":{"type":"string","enum":["needs_repair","damaged","missing","dirty","sensor_dust","low_battery","other"]},"note":{"type":"string"},"blocks_availability":{"type":"boolean"},"has_photo":{"type":"boolean"},"resolved_at":{"type":["string","null"],"format":"date-time"}},"required":["id"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"patch_flags_id","x-required-scopes":["loans:write"]}},"/api/studio-agent/v1/consumables":{"get":{"tags":["Gear"],"summary":"List consumables","description":"Requires `gear:read`. Pro plan. Batteries, media and other stock, by name.","parameters":[{"name":"category","in":"query","schema":{"type":"string","enum":["battery","media","cable","tape","gel","cleaning","power","other"]}},{"name":"low_stock","in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"include_archived","in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Consumables","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"brand":{"type":["string","null"]},"category":{"type":"string","enum":["battery","media","cable","tape","gel","cleaning","power","other"]},"unit":{"type":"string"},"quantity":{"type":"number"},"low_stock_threshold":{"type":["number","null"]},"low_stock":{"type":"boolean"},"unit_cost":{"type":["number","null"]},"location":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]}}},"notes":{"type":["string","null"]},"charge_cycles":{"type":["integer","null"],"description":"Batteries only"},"cycle_limit":{"type":["integer","null"]},"last_charged_at":{"type":["string","null"],"format":"date-time"}},"required":["id"]}},"pagination":{"$ref":"#/components/schemas/Pagination"},"filters":{"type":"object"}},"required":["data","pagination"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_consumables","x-required-scopes":["gear:read"]}},"/api/studio-agent/v1/consumables/{id}/adjust":{"post":{"tags":["Gear"],"summary":"Adjust stock","description":"Requires `gear:write`. Pro plan. A restock adds, use takes away. Dropping to the threshold sends the low-stock alert.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"delta":{"type":"number","minimum":-1000000,"maximum":1000000,"description":"Not 0; at most 2 decimal places"},"reason":{"type":"string","enum":["restock","used","adjust"]},"note":{"type":["string","null"],"maxLength":500}},"required":["delta","reason"]}}}},"responses":{"200":{"description":"The consumable after the change","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"brand":{"type":["string","null"]},"category":{"type":"string","enum":["battery","media","cable","tape","gel","cleaning","power","other"]},"unit":{"type":"string"},"quantity":{"type":"number"},"low_stock_threshold":{"type":["number","null"]},"low_stock":{"type":"boolean"},"unit_cost":{"type":["number","null"]},"location":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]}}},"notes":{"type":["string","null"]},"charge_cycles":{"type":["integer","null"],"description":"Batteries only"},"cycle_limit":{"type":["integer","null"]},"last_charged_at":{"type":["string","null"],"format":"date-time"},"adjustment":{"type":"object","properties":{"delta":{"type":"number"},"reason":{"type":"string"},"note":{"type":["string","null"]}}}},"required":["id"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_consumables_id_adjust","x-required-scopes":["gear:write"]}},"/api/studio-agent/v1/insurance":{"get":{"tags":["Documents"],"summary":"List insurance policies and certificates","description":"Requires `documents:read`. With coverage totals across the gear library.","parameters":[{"name":"kind","in":"query","schema":{"type":"string","enum":["policy","certificate"]}},{"name":"state","in":"query","schema":{"type":"string","enum":["active","expiring","expired","all"],"default":"all"}}],"responses":{"200":{"description":"Policies, certificates and a coverage summary","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["policy","certificate"]},"title":{"type":"string"},"insurer":{"type":["string","null"]},"policy_number":{"type":["string","null"]},"holder":{"type":["string","null"]},"coverage_amount":{"type":["number","null"]},"starts_on":{"type":["string","null"],"format":"date"},"expires_on":{"type":["string","null"],"format":"date"},"expiry_state":{"type":"string"},"days_until_expiry":{"type":["integer","null"]},"covers":{"type":"string","enum":["all_gear","listed","none"]},"covered_item_count":{"type":"integer","minimum":0},"covered_value":{"type":"number"},"over_coverage":{"type":"boolean"},"has_file":{"type":"boolean"},"place":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"shoot_id":{"type":["string","null"],"format":"uuid"},"notes":{"type":["string","null"]}},"required":["id"]}},"summary":{"type":"object"},"filters":{"type":"object"}},"required":["data","summary"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_insurance","x-required-scopes":["documents:read"]}},"/api/studio-agent/v1/insurance/{id}":{"get":{"tags":["Documents"],"summary":"Get a policy or certificate","description":"Requires `documents:read`. With the gear it covers.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The document","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["policy","certificate"]},"title":{"type":"string"},"insurer":{"type":["string","null"]},"policy_number":{"type":["string","null"]},"holder":{"type":["string","null"]},"coverage_amount":{"type":["number","null"]},"starts_on":{"type":["string","null"],"format":"date"},"expires_on":{"type":["string","null"],"format":"date"},"expiry_state":{"type":"string"},"days_until_expiry":{"type":["integer","null"]},"covers":{"type":"string","enum":["all_gear","listed","none"]},"covered_item_count":{"type":"integer","minimum":0},"covered_value":{"type":"number"},"over_coverage":{"type":"boolean"},"has_file":{"type":"boolean"},"place":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"shoot_id":{"type":["string","null"],"format":"uuid"},"notes":{"type":["string","null"]},"covered_items":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"value":{"type":["number","null"]},"estimated":{"type":"boolean"}}}}},"required":["id"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_insurance_id","x-required-scopes":["documents:read"]}},"/api/studio-agent/v1/rentals":{"get":{"tags":["Shoots"],"summary":"List rentals","description":"Requires `shoots:read`. Gear rented in, due date first.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["open","reserved","picked_up","returned","cancelled","all"],"default":"all"}},{"name":"shoot_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"overdue","in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Rentals","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"item_name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":999},"rental_house":{"type":["string","null"],"maxLength":200},"rental_house_contact":{"type":["string","null"],"maxLength":200},"order_reference":{"type":["string","null"],"maxLength":120},"shoot_id":{"type":["string","null"],"format":"uuid"},"pickup_on":{"type":["string","null"],"format":"date"},"return_due_on":{"type":["string","null"],"format":"date"},"cost":{"type":["number","null"],"minimum":0},"deposit":{"type":["number","null"],"minimum":0},"replacement_value":{"type":["number","null"],"minimum":0},"certificate_id":{"type":["string","null"],"format":"uuid","description":"An insurance certificate that covers the rental"},"notes":{"type":["string","null"],"maxLength":5000},"status":{"type":"string","enum":["reserved","picked_up","returned","cancelled"]},"returned_at":{"type":["string","null"],"format":"date-time"},"expense_id":{"type":["string","null"],"format":"uuid"},"overdue":{"type":"boolean"},"next_status":{"type":["string","null"]},"posts_to_shoot":{"type":"boolean","description":"A costed rental on a shoot posts to its expenses"},"shoot":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"shoot_date":{"type":["string","null"],"format":"date"}}},"certificate":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"expires_on":{"type":["string","null"],"format":"date"}}}},"required":["id"]}},"pagination":{"$ref":"#/components/schemas/Pagination"},"filters":{"type":"object"}},"required":["data","pagination"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_rentals","x-required-scopes":["shoots:read"]},"post":{"tags":["Shoots"],"summary":"Add a rental","description":"Requires `shoots:write`. Starts as reserved. A costed rental on a shoot posts to its expenses.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"item_name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":999},"rental_house":{"type":["string","null"],"maxLength":200},"rental_house_contact":{"type":["string","null"],"maxLength":200},"order_reference":{"type":["string","null"],"maxLength":120},"shoot_id":{"type":["string","null"],"format":"uuid"},"pickup_on":{"type":["string","null"],"format":"date"},"return_due_on":{"type":["string","null"],"format":"date"},"cost":{"type":["number","null"],"minimum":0},"deposit":{"type":["number","null"],"minimum":0},"replacement_value":{"type":["number","null"],"minimum":0},"certificate_id":{"type":["string","null"],"format":"uuid","description":"An insurance certificate that covers the rental"},"notes":{"type":["string","null"],"maxLength":5000}},"required":["item_name"]}}}},"responses":{"201":{"description":"The rental","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"item_name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":999},"rental_house":{"type":["string","null"],"maxLength":200},"rental_house_contact":{"type":["string","null"],"maxLength":200},"order_reference":{"type":["string","null"],"maxLength":120},"shoot_id":{"type":["string","null"],"format":"uuid"},"pickup_on":{"type":["string","null"],"format":"date"},"return_due_on":{"type":["string","null"],"format":"date"},"cost":{"type":["number","null"],"minimum":0},"deposit":{"type":["number","null"],"minimum":0},"replacement_value":{"type":["number","null"],"minimum":0},"certificate_id":{"type":["string","null"],"format":"uuid","description":"An insurance certificate that covers the rental"},"notes":{"type":["string","null"],"maxLength":5000},"status":{"type":"string","enum":["reserved","picked_up","returned","cancelled"]},"returned_at":{"type":["string","null"],"format":"date-time"},"expense_id":{"type":["string","null"],"format":"uuid"},"overdue":{"type":"boolean"},"next_status":{"type":["string","null"]},"posts_to_shoot":{"type":"boolean","description":"A costed rental on a shoot posts to its expenses"},"shoot":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"shoot_date":{"type":["string","null"],"format":"date"}}},"certificate":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"expires_on":{"type":["string","null"],"format":"date"}}}},"required":["id"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_rentals","x-required-scopes":["shoots:write"]}},"/api/studio-agent/v1/rentals/{id}":{"patch":{"tags":["Shoots"],"summary":"Update a rental","description":"Requires `shoots:write`. Edit it or move its status. Returning stamps returned_at (now unless given).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"item_name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":999},"rental_house":{"type":["string","null"],"maxLength":200},"rental_house_contact":{"type":["string","null"],"maxLength":200},"order_reference":{"type":["string","null"],"maxLength":120},"shoot_id":{"type":["string","null"],"format":"uuid"},"pickup_on":{"type":["string","null"],"format":"date"},"return_due_on":{"type":["string","null"],"format":"date"},"cost":{"type":["number","null"],"minimum":0},"deposit":{"type":["number","null"],"minimum":0},"replacement_value":{"type":["number","null"],"minimum":0},"certificate_id":{"type":["string","null"],"format":"uuid","description":"An insurance certificate that covers the rental"},"notes":{"type":["string","null"],"maxLength":5000},"status":{"type":"string","enum":["reserved","picked_up","returned","cancelled"]},"returned_at":{"type":["string","null"],"format":"date-time"}},"minProperties":1}}}},"responses":{"200":{"description":"The rental","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"item_name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":999},"rental_house":{"type":["string","null"],"maxLength":200},"rental_house_contact":{"type":["string","null"],"maxLength":200},"order_reference":{"type":["string","null"],"maxLength":120},"shoot_id":{"type":["string","null"],"format":"uuid"},"pickup_on":{"type":["string","null"],"format":"date"},"return_due_on":{"type":["string","null"],"format":"date"},"cost":{"type":["number","null"],"minimum":0},"deposit":{"type":["number","null"],"minimum":0},"replacement_value":{"type":["number","null"],"minimum":0},"certificate_id":{"type":["string","null"],"format":"uuid","description":"An insurance certificate that covers the rental"},"notes":{"type":["string","null"],"maxLength":5000},"status":{"type":"string","enum":["reserved","picked_up","returned","cancelled"]},"returned_at":{"type":["string","null"],"format":"date-time"},"expense_id":{"type":["string","null"],"format":"uuid"},"overdue":{"type":"boolean"},"next_status":{"type":["string","null"]},"posts_to_shoot":{"type":"boolean","description":"A costed rental on a shoot posts to its expenses"},"shoot":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"shoot_date":{"type":["string","null"],"format":"date"}}},"certificate":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"expires_on":{"type":["string","null"],"format":"date"}}}},"required":["id"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"patch_rentals_id","x-required-scopes":["shoots:write"]},"delete":{"tags":["Shoots"],"summary":"Delete a rental","description":"Requires `shoots:write`. Also deletes the shoot expense it posted.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The deleted rental","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"item_name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":999},"rental_house":{"type":["string","null"],"maxLength":200},"rental_house_contact":{"type":["string","null"],"maxLength":200},"order_reference":{"type":["string","null"],"maxLength":120},"shoot_id":{"type":["string","null"],"format":"uuid"},"pickup_on":{"type":["string","null"],"format":"date"},"return_due_on":{"type":["string","null"],"format":"date"},"cost":{"type":["number","null"],"minimum":0},"deposit":{"type":["number","null"],"minimum":0},"replacement_value":{"type":["number","null"],"minimum":0},"certificate_id":{"type":["string","null"],"format":"uuid","description":"An insurance certificate that covers the rental"},"notes":{"type":["string","null"],"maxLength":5000},"status":{"type":"string","enum":["reserved","picked_up","returned","cancelled"]},"returned_at":{"type":["string","null"],"format":"date-time"},"expense_id":{"type":["string","null"],"format":"uuid"},"overdue":{"type":"boolean"},"next_status":{"type":["string","null"]},"posts_to_shoot":{"type":"boolean","description":"A costed rental on a shoot posts to its expenses"},"shoot":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"shoot_date":{"type":["string","null"],"format":"date"}}},"certificate":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"expires_on":{"type":["string","null"],"format":"date"}}}},"required":["id"]}},"required":["success","data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"delete_rentals_id","x-required-scopes":["shoots:write"]}},"/api/studio-agent/v1/shoots/{id}/gear":{"get":{"tags":["Shoots"],"summary":"Get a shoot's packing list","description":"Requires `shoots:read`. Each item with its hold for the shoot window and packed state.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Packing list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"status":{"type":["string","null"]},"is_packed":{"type":"boolean"},"notes":{"type":["string","null"]},"reservation":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"},"start_at":{"type":"string","format":"date-time"},"end_at":{"type":"string","format":"date-time"}}},"incident":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["lost","stolen"]},"occurred_on":{"type":"string","format":"date"}}}}}},"summary":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"packed":{"type":"integer","minimum":0}},"required":["total","packed"]}},"required":["data","summary"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_shoots_id_gear","x-required-scopes":["shoots:read"]},"post":{"tags":["Shoots"],"summary":"Add gear to a shoot","description":"Requires `shoots:write`. Adds items and/or a kit's gear and holds them for the shoot window. If any item can't be held, nothing is added (`409 conflict`).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"}},"required":["gear_type","gear_id"]},"maxItems":100},"kit_id":{"type":"string","format":"uuid"}},"anyOf":[{"required":["items"]},{"required":["kit_id"]}]}}}},"responses":{"201":{"description":"Packing list, plus what was added and skipped","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"status":{"type":["string","null"]},"is_packed":{"type":"boolean"},"notes":{"type":["string","null"]},"reservation":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"},"start_at":{"type":"string","format":"date-time"},"end_at":{"type":"string","format":"date-time"}}},"incident":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["lost","stolen"]},"occurred_on":{"type":"string","format":"date"}}}}}},"summary":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"packed":{"type":"integer","minimum":0}},"required":["total","packed"]},"added":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"}},"required":["gear_type","gear_id"]},"maxItems":100},"skipped":{"type":"array","items":{"type":"object"}}},"required":["data","summary"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_shoots_id_gear","x-required-scopes":["shoots:write"]},"patch":{"tags":["Shoots"],"summary":"Pack, unpack or remove gear","description":"Requires `shoots:write`. Removing an item releases its hold. An item can be in only one list.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"packed":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"}},"required":["gear_type","gear_id"]},"maxItems":100},"unpacked":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"}},"required":["gear_type","gear_id"]},"maxItems":100},"remove":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"}},"required":["gear_type","gear_id"]},"maxItems":100}},"minProperties":1}}}},"responses":{"200":{"description":"Packing list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"gear_id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"status":{"type":["string","null"]},"is_packed":{"type":"boolean"},"notes":{"type":["string","null"]},"reservation":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"},"start_at":{"type":"string","format":"date-time"},"end_at":{"type":"string","format":"date-time"}}},"incident":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["lost","stolen"]},"occurred_on":{"type":"string","format":"date"}}}}}},"summary":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"packed":{"type":"integer","minimum":0}},"required":["total","packed"]}},"required":["data","summary"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"patch_shoots_id_gear","x-required-scopes":["shoots:write"]}},"/api/studio-agent/v1/clients":{"get":{"tags":["Clients"],"summary":"List clients","description":"Requires `shoots:read`. Pro plan. People and companies, recently updated first. q matches name, email, company and phone.","parameters":[{"name":"q","in":"query","schema":{"type":"string","maxLength":100}},{"name":"status","in":"query","schema":{"type":"string","enum":["lead","active","past","contact"]}},{"name":"kind","in":"query","schema":{"type":"string","enum":["person","business"]}},{"name":"include_archived","in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Clients","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["person","business"]},"name":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"company":{"type":["string","null"]},"status":{"type":"string","enum":["lead","active","past","contact"]},"tags":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"},"follow_up_on":{"type":["string","null"],"format":"date"},"lead_source":{"type":["string","null"]},"organization":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"archived_at":{"type":["string","null"],"format":"date-time"}},"required":["id"]}},"pagination":{"$ref":"#/components/schemas/Pagination"},"filters":{"type":"object"}},"required":["data","pagination"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_clients","x-required-scopes":["shoots:read"]},"post":{"tags":["Clients"],"summary":"Add a client","description":"Requires `shoots:write`. Pro plan. An email already in the CRM returns `409`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"kind":{"type":"string","enum":["person","business"]},"status":{"type":"string","enum":["lead","active","past","contact"]},"email":{"type":["string","null"],"maxLength":320},"phone":{"type":["string","null"],"maxLength":50},"company":{"type":["string","null"],"maxLength":200},"notes":{"type":["string","null"],"maxLength":10000},"tags":{"type":"array","items":{"type":"string"}},"organization_id":{"type":["string","null"],"format":"uuid","description":"The company this person works at"},"referred_by_id":{"type":["string","null"],"format":"uuid"},"partner_id":{"type":["string","null"],"format":"uuid"},"pronouns":{"type":["string","null"],"maxLength":40},"lead_source":{"type":["string","null"],"maxLength":60},"website":{"type":["string","null"],"maxLength":300},"instagram":{"type":["string","null"],"maxLength":100},"birthday":{"type":["string","null"],"format":"date"},"follow_up_on":{"type":["string","null"],"format":"date"},"starred":{"type":"boolean"},"marketing_consent":{"type":"boolean"},"address":{"type":["object","null"],"properties":{"line1":{"type":["string","null"],"maxLength":200},"line2":{"type":["string","null"],"maxLength":200},"city":{"type":["string","null"],"maxLength":200},"region":{"type":["string","null"],"maxLength":200},"postal":{"type":["string","null"],"maxLength":200},"country":{"type":["string","null"],"maxLength":200}}}},"required":["name"]}}}},"responses":{"201":{"description":"The client","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["person","business"]},"name":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"company":{"type":["string","null"]},"status":{"type":"string","enum":["lead","active","past","contact"]},"tags":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"},"follow_up_on":{"type":["string","null"],"format":"date"},"lead_source":{"type":["string","null"]},"organization":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"archived_at":{"type":["string","null"],"format":"date-time"},"notes":{"type":["string","null"]},"pronouns":{"type":["string","null"]},"website":{"type":["string","null"]},"instagram":{"type":["string","null"]},"birthday":{"type":["string","null"],"format":"date"},"address":{"type":["object","null"]},"has_avatar":{"type":"boolean"},"partner":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"referred_by":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}},"required":["id"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_clients","x-required-scopes":["shoots:write"]}},"/api/studio-agent/v1/clients/{id}":{"get":{"tags":["Clients"],"summary":"Get a client","description":"Requires `shoots:read`. Pro plan. With their jobs, shoots, open tasks and recent activity.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The client","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["person","business"]},"name":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"company":{"type":["string","null"]},"status":{"type":"string","enum":["lead","active","past","contact"]},"tags":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"},"follow_up_on":{"type":["string","null"],"format":"date"},"lead_source":{"type":["string","null"]},"organization":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"archived_at":{"type":["string","null"],"format":"date-time"},"notes":{"type":["string","null"]},"pronouns":{"type":["string","null"]},"website":{"type":["string","null"]},"instagram":{"type":["string","null"]},"birthday":{"type":["string","null"],"format":"date"},"address":{"type":["object","null"]},"has_avatar":{"type":"boolean"},"partner":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"referred_by":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"jobs":{"type":"array","items":{"type":"object"}},"shoots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"shoot_date":{"type":["string","null"],"format":"date"},"status":{"type":"string"},"role":{"type":"string"}}}},"open_tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"due_on":{"type":["string","null"],"format":"date"}}}},"recent_activities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["note","call","email","meeting"]},"body":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"},"client_id":{"type":"string","format":"uuid"},"shoot_id":{"type":["string","null"],"format":"uuid"},"job_id":{"type":["string","null"],"format":"uuid"},"shoot":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}},"required":["id"]}}},"required":["id"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"get_clients_id","x-required-scopes":["shoots:read"]},"patch":{"tags":["Clients"],"summary":"Update a client","description":"Requires `shoots:write`. Pro plan. Send only the fields to change.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"kind":{"type":"string","enum":["person","business"]},"status":{"type":"string","enum":["lead","active","past","contact"]},"email":{"type":["string","null"],"maxLength":320},"phone":{"type":["string","null"],"maxLength":50},"company":{"type":["string","null"],"maxLength":200},"notes":{"type":["string","null"],"maxLength":10000},"tags":{"type":"array","items":{"type":"string"}},"organization_id":{"type":["string","null"],"format":"uuid","description":"The company this person works at"},"referred_by_id":{"type":["string","null"],"format":"uuid"},"partner_id":{"type":["string","null"],"format":"uuid"},"pronouns":{"type":["string","null"],"maxLength":40},"lead_source":{"type":["string","null"],"maxLength":60},"website":{"type":["string","null"],"maxLength":300},"instagram":{"type":["string","null"],"maxLength":100},"birthday":{"type":["string","null"],"format":"date"},"follow_up_on":{"type":["string","null"],"format":"date"},"starred":{"type":"boolean"},"marketing_consent":{"type":"boolean"},"address":{"type":["object","null"],"properties":{"line1":{"type":["string","null"],"maxLength":200},"line2":{"type":["string","null"],"maxLength":200},"city":{"type":["string","null"],"maxLength":200},"region":{"type":["string","null"],"maxLength":200},"postal":{"type":["string","null"],"maxLength":200},"country":{"type":["string","null"],"maxLength":200}}}},"minProperties":1}}}},"responses":{"200":{"description":"The client","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["person","business"]},"name":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"company":{"type":["string","null"]},"status":{"type":"string","enum":["lead","active","past","contact"]},"tags":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"},"follow_up_on":{"type":["string","null"],"format":"date"},"lead_source":{"type":["string","null"]},"organization":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"archived_at":{"type":["string","null"],"format":"date-time"},"notes":{"type":["string","null"]},"pronouns":{"type":["string","null"]},"website":{"type":["string","null"]},"instagram":{"type":["string","null"]},"birthday":{"type":["string","null"],"format":"date"},"address":{"type":["object","null"]},"has_avatar":{"type":"boolean"},"partner":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"referred_by":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}},"required":["id"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"patch_clients_id","x-required-scopes":["shoots:write"]}},"/api/studio-agent/v1/clients/{id}/activities":{"post":{"tags":["Clients"],"summary":"Log client activity","description":"Requires `shoots:write`. Pro plan. A note, call, email or meeting, optionally on one of their shoots or jobs.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["note","call","email","meeting"],"default":"note"},"body":{"type":"string","minLength":1,"maxLength":5000},"occurred_at":{"type":"string","format":"date-time","description":"Defaults to now; no more than a day ahead"},"shoot_id":{"type":"string","format":"uuid"},"job_id":{"type":"string","format":"uuid"}},"required":["body"]}}}},"responses":{"201":{"description":"The activity","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["note","call","email","meeting"]},"body":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"},"client_id":{"type":"string","format":"uuid"},"shoot_id":{"type":["string","null"],"format":"uuid"},"job_id":{"type":["string","null"],"format":"uuid"},"shoot":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}},"required":["id"]}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"operationId":"post_clients_id_activities","x-required-scopes":["shoots:write"]}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key"}},"schemas":{"CreateGearRequest":{"type":"object","required":["gear_type","brand","model"],"properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"brand":{"type":"string","maxLength":255},"model":{"type":"string","maxLength":255},"serial_number":{"type":["string","null"],"maxLength":255},"purchase_date":{"type":["string","null"],"format":"date"},"purchase_price":{"type":["number","null"],"minimum":0,"maximum":100000000},"condition":{"type":["string","null"],"enum":["excellent","very-good","good","fair","poor",null]},"status":{"type":["string","null"],"enum":["available","on-loan","maintenance","retired",null]},"notes":{"type":["string","null"],"maxLength":5000},"description":{"type":["string","null"],"maxLength":5000},"category_id":{"type":["string","null"],"format":"uuid"},"location_id":{"type":["string","null"],"format":"uuid"},"image_url":{"type":["string","null"],"maxLength":2048},"weight_grams":{"type":["integer","null"],"minimum":0,"maximum":1000000},"camera_type":{"type":["string","null"],"maxLength":100},"mount_type":{"type":["string","null"],"maxLength":100},"megapixels":{"type":["string","null"],"maxLength":50},"sensor_size":{"type":["string","null"],"maxLength":100},"focal_length":{"type":["string","null"],"maxLength":100},"aperture":{"type":["string","null"],"maxLength":50},"filter_type":{"type":["string","null"],"maxLength":100,"description":"Required when gear_type is filter."},"filter_size":{"type":["string","null"],"maxLength":50,"description":"Filter thread diameter in mm, number only, 10-300 (e.g. 77 or 40.5). A filter may instead name its holder system or Series size (e.g. Cokin P, Lee 100, Series VI), up to 40 characters."},"accessory_type":{"type":["string","null"],"maxLength":100},"drone_type":{"type":["string","null"],"maxLength":100},"faa_registration_number":{"type":["string","null"],"maxLength":100},"remote_id_compliant":{"type":["boolean","null"]}}},"UpdateGearRequest":{"type":"object","required":["gear_type","updates"],"properties":{"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"updates":{"type":"object","minProperties":1,"description":"Supported update fields mirror create fields. Optional text/date/number fields can be set to null to clear them.","properties":{"brand":{"type":"string","maxLength":255},"model":{"type":"string","maxLength":255},"serial_number":{"type":["string","null"],"maxLength":255},"purchase_date":{"type":["string","null"],"format":"date"},"purchase_price":{"type":["number","null"],"minimum":0,"maximum":100000000},"condition":{"type":"string","enum":["excellent","very-good","good","fair","poor"]},"status":{"type":"string","enum":["available","on-loan","maintenance","retired"]},"notes":{"type":["string","null"],"maxLength":5000},"description":{"type":["string","null"],"maxLength":5000},"category_id":{"type":["string","null"],"format":"uuid"},"location_id":{"type":["string","null"],"format":"uuid"},"image_url":{"type":["string","null"],"maxLength":2048},"weight_grams":{"type":["integer","null"],"minimum":0,"maximum":1000000},"camera_type":{"type":["string","null"],"maxLength":100},"mount_type":{"type":["string","null"],"maxLength":100},"focal_length":{"type":["string","null"],"maxLength":100},"aperture":{"type":["string","null"],"maxLength":50},"filter_type":{"type":["string","null"],"maxLength":100},"filter_size":{"type":["string","null"],"maxLength":50,"description":"Filter thread diameter in mm, number only, 10-300 (e.g. 77 or 40.5). A filter may instead name its holder system or Series size (e.g. Cokin P, Lee 100, Series VI), up to 40 characters."},"accessory_type":{"type":["string","null"],"maxLength":100},"drone_type":{"type":["string","null"],"maxLength":100},"remote_id_compliant":{"type":["boolean","null"]}}}}},"Gear":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"brand":{"type":["string","null"]},"model":{"type":["string","null"]},"status":{"type":["string","null"]},"condition":{"type":["string","null"]},"purchase_price":{"type":["number","null"]},"purchase_date":{"type":["string","null"],"format":"date"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"incident":{"type":["object","null"],"description":"An open lost or stolen report. While it's open the item can't be checked out, held or rented.","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["lost","stolen"]},"occurred_on":{"type":"string","format":"date"}}},"shutter_count":{"type":["integer","null"],"readOnly":true,"description":"Cameras only. The latest logged shutter count."},"shutter_count_read_on":{"type":["string","null"],"format":"date","readOnly":true,"description":"Cameras only. The date of the latest shutter count."},"rated_shutter_life":{"type":["integer","null"],"readOnly":true,"description":"Cameras only. The owner's rated shutter life, in actuations."}}},"CreateShootRequest":{"type":"object","required":["title","client_name","shoot_date"],"properties":{"title":{"type":"string","maxLength":160},"client_name":{"type":"string","maxLength":160},"shoot_date":{"type":"string","format":"date"},"shoot_end_date":{"type":["string","null"],"format":"date"},"shoot_time":{"type":["string","null"],"pattern":"^([01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d)?$"},"shoot_end_time":{"type":["string","null"],"pattern":"^([01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d)?$"},"location":{"type":["string","null"],"maxLength":500},"locations":{"oneOf":[{"type":"array","maxItems":20,"items":{"type":"string","maxLength":500}},{"type":"string","description":"Semicolon- or newline-separated location names."}]},"notes":{"type":["string","null"],"maxLength":5000}}},"UpdateShootRequest":{"type":"object","required":["updates"],"properties":{"updates":{"type":"object","minProperties":1,"description":"Supported fields: title, client_name, shoot_date, shoot_end_date, shoot_time, shoot_end_time, location, status, notes, and completion_progress. Optional text/date/time fields can be set to null to clear them.","properties":{"title":{"type":"string","maxLength":160},"client_name":{"type":"string","maxLength":160},"shoot_date":{"type":"string","format":"date"},"shoot_end_date":{"type":["string","null"],"format":"date"},"shoot_time":{"type":["string","null"],"pattern":"^([01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d)?$"},"shoot_end_time":{"type":["string","null"],"pattern":"^([01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d)?$"},"location":{"type":["string","null"],"maxLength":500},"status":{"type":"string","enum":["planning","confirmed","completed","cancelled"]},"notes":{"type":["string","null"],"maxLength":5000},"completion_progress":{"type":"integer","minimum":0,"maximum":100}}}}},"Shoot":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":["string","null"]},"client_name":{"type":["string","null"]},"shoot_date":{"type":["string","null"],"format":"date"},"shoot_end_date":{"type":["string","null"],"format":"date"},"shoot_time":{"type":["string","null"]},"shoot_end_time":{"type":["string","null"]},"location":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["planning","confirmed","completed","cancelled",null]},"completion_progress":{"type":["integer","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"CreateMaintenanceRequest":{"type":"object","required":["item_type","item_id","service_type","service_date"],"properties":{"item_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"],"description":"The gear type for the owned gear item being serviced."},"item_id":{"type":"string","format":"uuid","description":"Owned gear item UUID. The API validates this against item_type."},"service_type":{"type":"string","maxLength":160},"service_date":{"type":"string","format":"date"},"cost":{"type":["number","null"],"minimum":0,"maximum":100000000},"service_provider":{"type":["string","null"],"maxLength":255},"notes":{"type":["string","null"],"maxLength":5000},"status":{"type":"string","enum":["scheduled","in_progress","completed","cancelled"],"default":"scheduled"},"recurrence_months":{"type":["integer","null"],"minimum":1,"maximum":60,"description":"Repeat every N months; completing the record schedules the next. Not with recurrence_uses."},"recurrence_uses":{"type":["integer","null"],"minimum":1,"maximum":1000,"description":"Repeat after N uses. Not with recurrence_months."}}},"UpdateMaintenanceRequest":{"type":"object","required":["updates"],"properties":{"updates":{"type":"object","minProperties":1,"description":"Supported fields: item_type, item_id, service_type, service_date, cost, service_provider, notes, status, recurrence_months and recurrence_uses. Optional text/number fields can be set to null to clear them.","properties":{"item_type":{"type":"string","enum":["camera","lens","accessory","filter","drone"]},"item_id":{"type":"string","format":"uuid"},"service_type":{"type":"string","maxLength":160},"service_date":{"type":"string","format":"date"},"cost":{"type":["number","null"],"minimum":0,"maximum":100000000},"service_provider":{"type":["string","null"],"maxLength":255},"notes":{"type":["string","null"],"maxLength":5000},"status":{"type":"string","enum":["scheduled","in_progress","completed","cancelled"]},"recurrence_months":{"type":["integer","null"],"minimum":1,"maximum":60,"description":"Repeat every N months; completing the record schedules the next. Not with recurrence_uses."},"recurrence_uses":{"type":["integer","null"],"minimum":1,"maximum":1000,"description":"Repeat after N uses. Not with recurrence_months."}}}}},"Maintenance":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"item_type":{"type":["string","null"],"enum":["camera","lens","accessory","filter","drone",null]},"item_id":{"type":["string","null"],"format":"uuid"},"service_type":{"type":["string","null"]},"service_date":{"type":["string","null"],"format":"date"},"cost":{"type":["number","null"]},"service_provider":{"type":["string","null"]},"notes":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["scheduled","in_progress","completed","cancelled",null]},"recurrence_months":{"type":["integer","null"]},"recurrence_uses":{"type":["integer","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]},"Pagination":{"type":"object","properties":{"limit":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0},"returned":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}},"required":["limit","offset","returned","total"]},"Document":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"gear_item_type":{"type":["string","null"],"enum":["camera","lens","accessory","filter","drone",null]},"gear_item_id":{"type":["string","null"],"format":"uuid"},"document_type":{"type":["string","null"],"enum":["receipt","warranty","insurance","user_manual",null]},"file_name":{"type":["string","null"]},"file_path":{"type":["string","null"]},"file_url":{"type":["string","null"]},"file_size":{"type":["integer","null"]},"mime_type":{"type":["string","null"]},"warranty_expiry_date":{"type":["string","null"],"format":"date"},"warranty_status":{"type":["string","null"],"enum":["expired","critical","urgent","warning","active",null]},"notes":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Analytics":{"type":"object","properties":{"generated_at":{"type":"string","format":"date-time"},"inventory":{"type":"object","properties":{"total_items":{"type":"integer","minimum":0},"by_type":{"type":"object","properties":{"camera":{"type":"integer","minimum":0},"lens":{"type":"integer","minimum":0},"accessory":{"type":"integer","minimum":0},"filter":{"type":"integer","minimum":0},"drone":{"type":"integer","minimum":0}},"required":["camera","lens","accessory","filter","drone"]}},"required":["total_items","by_type"]},"shoots":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"by_status":{"type":"object","properties":{"planning":{"type":"integer","minimum":0},"confirmed":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"cancelled":{"type":"integer","minimum":0}},"required":["planning","confirmed","completed","cancelled"]}}},"maintenance":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"by_status":{"type":"object","properties":{"scheduled":{"type":"integer","minimum":0},"in_progress":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"cancelled":{"type":"integer","minimum":0}},"required":["scheduled","in_progress","completed","cancelled"]}}},"documents":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"by_type":{"type":"object","properties":{"receipt":{"type":"integer","minimum":0},"warranty":{"type":"integer","minimum":0},"insurance":{"type":"integer","minimum":0},"user_manual":{"type":"integer","minimum":0}},"required":["receipt","warranty","insurance","user_manual"]}}}},"required":["generated_at","inventory","shoots","maintenance","documents"]},"Booking":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["requested","confirmed","cancelled","expired"]},"start_at":{"type":"string","format":"date-time"},"end_at":{"type":"string","format":"date-time"},"timezone":{"type":"string"},"client_name":{"type":"string"},"client_email":{"type":["string","null"]},"shoot_id":{"type":["string","null"],"format":"uuid"},"session_type":{"type":["object","null"]}},"required":["id"]},"Inquiry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["new","replied","converted","archived"]},"name":{"type":"string"},"email":{"type":["string","null"]},"message":{"type":["string","null"]},"client_id":{"type":["string","null"],"format":"uuid"}},"required":["id"]},"Job":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"client":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"notes":{"type":["string","null"]},"cancelled_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"shoots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"shoot_date":{"type":["string","null"],"format":"date"},"shoot_end_date":{"type":["string","null"],"format":"date"},"status":{"type":"string"}},"required":["id"]}},"money":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"invoiced":{"type":"number","description":"Amount in the record's currency units, not cents"},"collected":{"type":"number","description":"Amount in the record's currency units, not cents"},"owed":{"type":"number","description":"Amount in the record's currency units, not cents"}},"required":["currency","invoiced","collected","owed"]},"description":"Invoiced, collected and owed per currency"},"costs":{"type":"number","description":"Every expense on the job's shoots, rentals and crew pay included"},"profit":{"type":["number","null"],"description":"Collected less costs; null when the job bills in more than one currency"}},"required":["id"]},"Quote":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","sent","accepted","declined","expired"]},"quote_number":{"type":"string"},"client_name":{"type":"string"},"client_email":{"type":["string","null"]},"currency":{"type":"string"},"subtotal":{"type":"number","description":"Amount in the record's currency units, not cents"},"tax_rate":{"type":"number"},"tax_amount":{"type":"number","description":"Amount in the record's currency units, not cents"},"total":{"type":"number","description":"Amount in the record's currency units, not cents"},"line_items":{"type":"array","items":{"type":"object"}},"payment_schedule":{"type":"array","items":{"type":"object"}},"url":{"type":"string","format":"uri"}},"required":["id"]},"Invoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"invoice_number":{"type":"string"},"status":{"type":"string","enum":["draft","sent","paid","overdue","void"]},"client_name":{"type":"string"},"currency":{"type":"string"},"total":{"type":"number","description":"Amount in the record's currency units, not cents"},"amount_paid":{"type":"number","description":"Amount in the record's currency units, not cents"},"installments":{"type":"array","items":{"type":"object"}},"payments":{"type":"array","items":{"type":"object"}},"url":{"type":["string","null"],"format":"uri"}},"required":["id"]},"Deliverable":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"shoot_id":{"type":"string","format":"uuid"},"title":{"type":"string"},"kind":{"type":"string","enum":["gallery","video","prints","album","other"]},"url":{"type":["string","null"]},"gallery_id":{"type":["string","null"],"format":"uuid"},"due_date":{"type":["string","null"],"format":"date"},"delivered_at":{"type":["string","null"],"format":"date-time"},"notified_at":{"type":["string","null"],"format":"date-time"},"sort_order":{"type":"integer","minimum":0}},"required":["id"]}},"responses":{"BadRequest":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Scope missing or feature unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Requested record was not found for this API key owner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Conflict":{"description":"The requested write conflicts with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InternalError":{"description":"The server could not complete the operation. Check whether a write succeeded before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"ServiceUnavailable":{"description":"Authentication configuration or distributed rate limiter is unavailable; access fails closed.","headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Seconds to wait when supplied"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"RateLimited":{"description":"Rate limited. Respect Retry-After header.","headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Seconds until another attempt is allowed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}