{"components":{"responses":{"BadRequest":{"content":{"application/json":{"example":{"error":{"code":"bad_request","message":"The request could not be understood.","details":{}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"The request was refused before it ran: a body that is not valid JSON, a token-shaped value in the URL, a missing parameter, a malformed Idempotency-Key, or an assistant key's write sent without one. Codes: bad_request, token_in_url, parameter_missing, invalid_idempotency_key, idempotency_key_required."},"Conflict":{"content":{"application/json":{"example":{"error":{"code":"idempotency_conflict","message":"A request with this Idempotency-Key is still being processed. Retry shortly.","details":{}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"A request with the same Idempotency-Key is still being processed. Codes: idempotency_conflict."},"Forbidden":{"content":{"application/json":{"example":{"error":{"code":"feature_disabled","message":"The LabDesk API is not enabled for this organization. An administrator can ask LabDesk support to turn it on.","details":{}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"The API, or the feature the operation reads, is not turned on for the organization, or the token lacks the scope or the permission the operation needs. Codes: feature_disabled, insufficient_scope, insufficient_permission."},"NotFound":{"content":{"application/json":{"example":{"error":{"code":"not_found","message":"The requested resource was not found.","details":{}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"No such record in the token's organization (another organization's record gives the same answer), no such path, or an operation for assistant keys only called with another token. Codes: not_found."},"TooManyRequests":{"content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Rate limit exceeded: 120 requests per minute per token. Retry after 30 seconds.","details":{"limit":120,"retry_after":30}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"A rate limit was reached. The Retry-After header gives the seconds until the limit resets. Codes: rate_limited, registration_in_progress.","headers":{"Retry-After":{"description":"Seconds until the limit resets.","example":30,"schema":{"type":"integer"}}}},"Unauthorized":{"content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"A valid API token is required. Send it as: Authorization: Bearer <token>.","details":{}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"The token is missing, unknown, revoked or expired. Codes: unauthorized.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"LabDesk API\".","example":"Bearer realm=\"LabDesk API\"","schema":{"type":"string"}}}},"UnprocessableEntity":{"content":{"application/json":{"example":{"error":{"code":"invalid_parameter","message":"The updated_since parameter is invalid.","details":{"parameter":"updated_since"}}},"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"A query parameter or the request body failed validation, an assistant key sent a query parameter or a body field the operation does not accept, or an Idempotency-Key was reused with a different request. Codes: invalid_parameter, unknown_parameter, unknown_field, validation_failed, idempotency_key_reused."}},"schemas":{"AttentionItem":{"additionalProperties":false,"description":"Something due on an asset, ranked by urgency.","properties":{"due_date":{"description":"When it is due.","format":"date","nullable":true,"type":"string"},"due_type":{"description":"What is due.","enum":["service","calibration","warranty"],"type":"string"},"equipment":{"allOf":[{"$ref":"#/components/schemas/EquipmentRef"}],"description":"The asset.","nullable":true},"overdue_days":{"description":"Days past the due date; negative when it is not due yet.","type":"integer"},"rank_score":{"description":"The ranking score; higher is more urgent.","type":"number"},"reference_standard":{"description":"Whether the asset is a reference standard, which doubles its rank.","type":"boolean"},"severity_weight":{"description":"The weight of this kind of due item in the ranking.","type":"integer"}},"required":["equipment","due_type","due_date","overdue_days","severity_weight","reference_standard","rank_score"],"type":"object"},"AttentionItemList":{"additionalProperties":false,"description":"A page of AttentionItem records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/AttentionItem"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"CalibrationRecord":{"additionalProperties":false,"description":"A calibration record.","properties":{"as_found":{"description":"The as-found reading.","nullable":true,"type":"string"},"as_left":{"description":"The as-left reading.","nullable":true,"type":"string"},"created_at":{"description":"When the record was created (UTC).","format":"date-time","type":"string"},"equipment":{"allOf":[{"$ref":"#/components/schemas/EquipmentRef"}],"description":"The asset that was calibrated.","nullable":true},"id":{"description":"The record's id.","type":"integer"},"next_calibration_due":{"description":"When the next calibration is due.","format":"date","nullable":true,"type":"string"},"note":{"description":"The record's note, as its author wrote it.","nullable":true,"type":"string"},"out_of_tolerance":{"description":"Whether the asset was found out of tolerance.","type":"boolean"},"performed_by":{"description":"Who performed it.","nullable":true,"type":"string"},"performed_on":{"description":"When the calibration was performed.","format":"date","type":"string"},"result":{"description":"The calibration result.","enum":["pass","fail","limited"],"nullable":true,"type":"string"},"traceability_reference":{"description":"The traceability reference.","nullable":true,"type":"string"},"updated_at":{"description":"When the record was last changed (UTC).","format":"date-time","type":"string"}},"required":["id","equipment","performed_on","performed_by","result","as_found","as_left","out_of_tolerance","next_calibration_due","traceability_reference","note","created_at","updated_at"],"type":"object"},"CalibrationRecordList":{"additionalProperties":false,"description":"A page of CalibrationRecord records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/CalibrationRecord"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"CalibrationRecordRecord":{"additionalProperties":false,"description":"One CalibrationRecord record.","properties":{"data":{"$ref":"#/components/schemas/CalibrationRecord"},"meta":{"$ref":"#/components/schemas/RecordMeta"}},"required":["data"],"type":"object"},"Category":{"additionalProperties":false,"description":"A category.","properties":{"created_at":{"description":"When the record was created (UTC).","format":"date-time","type":"string"},"id":{"description":"The record's id.","type":"integer"},"name":{"description":"The category's name.","nullable":true,"type":"string"},"retired_at":{"description":"When the category was retired. Null for an active category.","format":"date-time","nullable":true,"type":"string"},"updated_at":{"description":"When the record was last changed (UTC).","format":"date-time","type":"string"}},"required":["id","name","retired_at","created_at","updated_at"],"type":"object"},"CategoryList":{"additionalProperties":false,"description":"A page of Category records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/Category"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"Department":{"additionalProperties":false,"description":"A department.","properties":{"created_at":{"description":"When the record was created (UTC).","format":"date-time","type":"string"},"id":{"description":"The record's id.","type":"integer"},"name":{"description":"The department's name.","nullable":true,"type":"string"},"updated_at":{"description":"When the record was last changed (UTC).","format":"date-time","type":"string"}},"required":["id","name","created_at","updated_at"],"type":"object"},"DepartmentList":{"additionalProperties":false,"description":"A page of Department records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/Department"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"DepartmentRecord":{"additionalProperties":false,"description":"One Department record.","properties":{"data":{"$ref":"#/components/schemas/Department"},"meta":{"$ref":"#/components/schemas/RecordMeta"}},"required":["data"],"type":"object"},"DowntimeIncident":{"additionalProperties":false,"description":"A period an asset was reported down.","properties":{"created_at":{"description":"When the record was created (UTC). Null in a dry run's answer (meta.dry_run true), where nothing was saved.","format":"date-time","nullable":true,"type":"string"},"down_at":{"description":"When the asset went down.","format":"date-time","type":"string"},"duration_seconds":{"description":"How long the asset was down, in seconds, up to now for an ongoing incident.","type":"integer"},"id":{"description":"The record's id. Null in a dry run's answer (meta.dry_run true), where nothing was saved.","nullable":true,"type":"integer"},"marked_up_by":{"allOf":[{"$ref":"#/components/schemas/PersonRef"}],"description":"Who marked the asset up again.","nullable":true},"note":{"description":"The incident's note, as its author wrote it.","nullable":true,"type":"string"},"ongoing":{"description":"Whether the asset is still down.","type":"boolean"},"reported_by":{"allOf":[{"$ref":"#/components/schemas/PersonRef"}],"description":"Who reported the asset down.","nullable":true},"up_at":{"description":"When the asset was marked up again. Null while it is still down.","format":"date-time","nullable":true,"type":"string"},"updated_at":{"description":"When the record was last changed (UTC). Null in a dry run's answer (meta.dry_run true), where nothing was saved.","format":"date-time","nullable":true,"type":"string"}},"required":["id","down_at","up_at","ongoing","duration_seconds","note","reported_by","marked_up_by","created_at","updated_at"],"type":"object"},"DowntimeIncidentList":{"additionalProperties":false,"description":"A page of DowntimeIncident records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/DowntimeIncident"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"DowntimeIncidentRecord":{"additionalProperties":false,"description":"One DowntimeIncident record.","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/DowntimeIncident"}],"description":"The incident. Null when markEquipmentUp finds no open incident (meta.outcome already_up).","nullable":true},"meta":{"$ref":"#/components/schemas/RecordMeta"}},"required":["data"],"type":"object"},"Equipment":{"additionalProperties":false,"description":"An asset.","properties":{"asset_number":{"description":"The organization's asset number.","nullable":true,"type":"string"},"assigned_to_name":{"description":"A free-text assignee name, for an assignee who is not a LabDesk user.","nullable":true,"type":"string"},"assigned_user":{"allOf":[{"$ref":"#/components/schemas/PersonRef"}],"description":"The person the asset is assigned to.","nullable":true},"barcode":{"description":"The asset's barcode.","nullable":true,"type":"string"},"calibration_interval_days":{"description":"Days between calibrations.","nullable":true,"type":"integer"},"category":{"allOf":[{"$ref":"#/components/schemas/Ref"}],"description":"The asset's category.","nullable":true},"created_at":{"description":"When the record was created (UTC).","format":"date-time","type":"string"},"date_acquired":{"description":"When the asset was acquired.","format":"date","nullable":true,"type":"string"},"department":{"allOf":[{"$ref":"#/components/schemas/Ref"}],"description":"The department the asset belongs to.","nullable":true},"end_of_support_date":{"description":"When the manufacturer's support ends.","format":"date","nullable":true,"type":"string"},"eol_date":{"description":"The asset's end-of-life date.","format":"date","nullable":true,"type":"string"},"finance_asset_number":{"description":"The finance department's asset number.","nullable":true,"type":"string"},"gxp":{"description":"Whether the asset is used in GxP-regulated work.","nullable":true,"type":"boolean"},"id":{"description":"The record's id.","type":"integer"},"is_reference_standard":{"description":"Whether the asset is a reference standard used to calibrate others.","type":"boolean"},"last_service_date":{"description":"The last service date on record.","format":"date","nullable":true,"type":"string"},"location":{"allOf":[{"$ref":"#/components/schemas/Ref"}],"description":"Where the asset is.","nullable":true},"manufacturer":{"allOf":[{"$ref":"#/components/schemas/Ref"}],"description":"The asset's manufacturer.","nullable":true},"model":{"allOf":[{"$ref":"#/components/schemas/Ref"}],"description":"The asset's model.","nullable":true},"next_calibration_due":{"description":"When the next calibration is due.","format":"date","nullable":true,"type":"string"},"next_service_date":{"description":"When the next service is due.","format":"date","nullable":true,"type":"string"},"nickname":{"description":"The asset's nickname.","nullable":true,"type":"string"},"no_longer_calibratable":{"description":"Whether the asset can no longer be calibrated.","type":"boolean"},"parent_id":{"description":"The id of the asset this one is part of.","nullable":true,"type":"integer"},"serial_number":{"description":"The manufacturer's serial number.","nullable":true,"type":"string"},"service_interval_days":{"description":"Days between services.","nullable":true,"type":"integer"},"status":{"allOf":[{"$ref":"#/components/schemas/Ref"}],"description":"The asset's equipment status.","nullable":true},"subcategory":{"allOf":[{"$ref":"#/components/schemas/Ref"}],"description":"The asset's subcategory.","nullable":true},"updated_at":{"description":"When the record was last changed (UTC).","format":"date-time","type":"string"},"warranty_expiry":{"description":"When the warranty ends.","format":"date","nullable":true,"type":"string"}},"required":["id","barcode","serial_number","asset_number","finance_asset_number","nickname","status","manufacturer","model","category","subcategory","department","location","assigned_user","assigned_to_name","parent_id","is_reference_standard","gxp","date_acquired","warranty_expiry","end_of_support_date","eol_date","last_service_date","next_service_date","service_interval_days","next_calibration_due","calibration_interval_days","no_longer_calibratable","created_at","updated_at"],"type":"object"},"EquipmentDocument":{"additionalProperties":false,"description":"A document filed on an asset: its metadata only. No link to the file and none of its text.","properties":{"byte_size":{"description":"The file's size in bytes.","type":"integer"},"content_type":{"description":"The file's media type.","nullable":true,"type":"string"},"filed_at":{"description":"When the document was filed.","format":"date-time","type":"string"},"filename":{"description":"The file's name.","type":"string"},"id":{"description":"The record's id.","type":"integer"},"service_report_result":{"description":"The latest recorded result of the service report in this file: passed, failed, or needs_follow_up (a follow-up is needed; it counts as neither passed nor failed). Null when none is recorded, or where the organization does not show report outcomes.","enum":["passed","failed","needs_follow_up"],"nullable":true,"type":"string"}},"required":["id","filename","content_type","byte_size","filed_at","service_report_result"],"type":"object"},"EquipmentDocumentList":{"additionalProperties":false,"description":"A page of EquipmentDocument records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/EquipmentDocument"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"EquipmentList":{"additionalProperties":false,"description":"A page of Equipment records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/Equipment"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"EquipmentNote":{"additionalProperties":false,"description":"A note on an asset.","properties":{"created_at":{"description":"When the record was created (UTC). Null in a dry run's answer (meta.dry_run true), where nothing was saved.","format":"date-time","nullable":true,"type":"string"},"equipment":{"allOf":[{"$ref":"#/components/schemas/EquipmentRef"}],"description":"The asset the note is on.","nullable":true},"id":{"description":"The record's id. Null in a dry run's answer (meta.dry_run true), where nothing was saved.","nullable":true,"type":"integer"},"note":{"description":"The note, as its author wrote it.","nullable":true,"type":"string"},"posted_by":{"allOf":[{"$ref":"#/components/schemas/PostedBy"}],"description":"Who posted the note.","nullable":true},"updated_at":{"description":"When the record was last changed (UTC). Null in a dry run's answer (meta.dry_run true), where nothing was saved.","format":"date-time","nullable":true,"type":"string"}},"required":["id","note","equipment","posted_by","created_at","updated_at"],"type":"object"},"EquipmentNoteList":{"additionalProperties":false,"description":"A page of EquipmentNote records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/EquipmentNote"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"EquipmentNoteRecord":{"additionalProperties":false,"description":"One EquipmentNote record.","properties":{"data":{"$ref":"#/components/schemas/EquipmentNote"},"meta":{"$ref":"#/components/schemas/RecordMeta"}},"required":["data"],"type":"object"},"EquipmentRecord":{"additionalProperties":false,"description":"One Equipment record.","properties":{"data":{"$ref":"#/components/schemas/Equipment"},"meta":{"$ref":"#/components/schemas/RecordMeta"}},"required":["data"],"type":"object"},"EquipmentRef":{"additionalProperties":false,"description":"A reference to an asset.","properties":{"barcode":{"description":"The asset's barcode. Null when the asset belongs to another organization.","nullable":true,"type":"string"},"id":{"description":"The asset's id.","type":"integer"},"name":{"description":"The asset's nickname, or its display name when it has none. Null when the asset belongs to another organization.","nullable":true,"type":"string"}},"required":["id","barcode","name"],"type":"object"},"EquipmentStatus":{"additionalProperties":false,"description":"An equipment status.","properties":{"id":{"description":"The record's id.","type":"integer"},"name":{"description":"The status's name.","nullable":true,"type":"string"}},"required":["id","name"],"type":"object"},"EquipmentStatusList":{"additionalProperties":false,"description":"A page of EquipmentStatus records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/EquipmentStatus"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"ErrorEnvelope":{"additionalProperties":false,"description":"Every error response.","properties":{"error":{"additionalProperties":false,"description":"The error.","properties":{"code":{"description":"A stable machine-readable code.","enum":["bad_request","token_in_url","parameter_missing","invalid_idempotency_key","idempotency_key_required","unauthorized","feature_disabled","insufficient_scope","insufficient_permission","not_found","idempotency_conflict","request_too_large","invalid_parameter","unknown_parameter","unknown_field","validation_failed","idempotency_key_reused","rate_limited","registration_in_progress","internal_error"],"type":"string"},"details":{"description":"Details specific to the code; empty when there are none.","type":"object"},"message":{"description":"A human-readable explanation.","type":"string"}},"required":["code","message","details"],"type":"object"}},"required":["error"],"type":"object"},"FailedServiceVisit":{"additionalProperties":false,"description":"A service visit whose latest recorded outcome is a failure.","properties":{"appointment":{"additionalProperties":false,"description":"The appointment, when the failure was recorded on it.","nullable":true,"properties":{"id":{"description":"The appointment's id.","type":"integer"},"outcome":{"description":"The appointment's outcome.","enum":["completed","failed"],"nullable":true,"type":"string"},"outcome_note":{"description":"The note recorded with the outcome. Null unless the key holds appointments:read and its user may view service appointments.","nullable":true,"type":"string"},"start_date":{"description":"When the visit started.","format":"date-time","nullable":true,"type":"string"}},"required":["id","start_date","outcome","outcome_note"],"type":"object"},"equipment":{"allOf":[{"$ref":"#/components/schemas/EquipmentRef"}],"description":"The asset the visit was for.","nullable":true},"recorded_at":{"description":"When the failure was recorded.","format":"date-time","nullable":true,"type":"string"},"service_day":{"description":"The day of the visit.","format":"date","nullable":true,"type":"string"},"service_report":{"additionalProperties":false,"description":"The service report, when the failure was recorded in a filed report.","nullable":true,"properties":{"id":{"description":"The id of the recorded report outcome.","type":"integer"},"on_file":{"description":"Whether the report's file is still on file.","type":"boolean"}},"required":["id","on_file"],"type":"object"},"source":{"description":"Where the failure was recorded: on the appointment, or in a filed service report.","enum":["appointment","service_report"],"type":"string"}},"required":["equipment","source","service_day","recorded_at","appointment","service_report"],"type":"object"},"FailedServiceVisitList":{"additionalProperties":false,"description":"A page of FailedServiceVisit records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/FailedServiceVisit"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"Flag":{"additionalProperties":false,"description":"A flag raised on an asset.","properties":{"created_at":{"description":"When the record was created (UTC). Null in a dry run's answer (meta.dry_run true), where nothing was saved.","format":"date-time","nullable":true,"type":"string"},"date_created":{"description":"When the flag was raised.","format":"date-time","nullable":true,"type":"string"},"date_marked_resolved":{"description":"When the flag was marked resolved.","format":"date-time","nullable":true,"type":"string"},"equipment":{"allOf":[{"$ref":"#/components/schemas/EquipmentRef"}],"description":"The flagged asset.","nullable":true},"id":{"description":"The record's id. Null in a dry run's answer (meta.dry_run true), where nothing was saved.","nullable":true,"type":"integer"},"notes":{"description":"The flag's most recent notes, newest first, 50 at most. Present on a single flag only.","items":{"$ref":"#/components/schemas/FlagNote"},"type":"array"},"notes_count":{"description":"How many notes the flag has.","type":"integer"},"recipient":{"allOf":[{"$ref":"#/components/schemas/PersonRef"}],"description":"Who the flag was raised to.","nullable":true},"resolved":{"description":"Whether the flag is resolved.","type":"boolean"},"resolved_by":{"allOf":[{"$ref":"#/components/schemas/PersonRef"}],"description":"Who marked the flag resolved.","nullable":true},"subject":{"description":"The flag's subject, as its author wrote it.","nullable":true,"type":"string"},"submitter":{"allOf":[{"$ref":"#/components/schemas/PersonRef"}],"description":"Who raised the flag.","nullable":true},"updated_at":{"description":"When the record was last changed (UTC). Null in a dry run's answer (meta.dry_run true), where nothing was saved.","format":"date-time","nullable":true,"type":"string"}},"required":["id","subject","equipment","submitter","recipient","resolved_by","resolved","date_created","date_marked_resolved","notes_count","created_at","updated_at"],"type":"object"},"FlagList":{"additionalProperties":false,"description":"A page of Flag records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/Flag"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"FlagNote":{"additionalProperties":false,"description":"A note on a flag.","properties":{"date_posted":{"description":"When the note was posted.","format":"date-time","nullable":true,"type":"string"},"id":{"description":"The record's id. Null in a dry run's answer (meta.dry_run true), where nothing was saved.","nullable":true,"type":"integer"},"note":{"description":"The note, as its author wrote it.","nullable":true,"type":"string"},"posted_by":{"allOf":[{"$ref":"#/components/schemas/PostedBy"}],"description":"Who posted the note.","nullable":true}},"required":["id","note","posted_by","date_posted"],"type":"object"},"FlagRecord":{"additionalProperties":false,"description":"One Flag record.","properties":{"data":{"$ref":"#/components/schemas/Flag"},"meta":{"$ref":"#/components/schemas/RecordMeta"}},"required":["data"],"type":"object"},"Location":{"additionalProperties":false,"description":"A location.","properties":{"barcode":{"description":"The location's barcode.","nullable":true,"type":"string"},"created_at":{"description":"When the record was created (UTC).","format":"date-time","type":"string"},"id":{"description":"The record's id.","type":"integer"},"name":{"description":"The location's name.","nullable":true,"type":"string"},"parent_location_id":{"description":"The id of the location this one is inside.","nullable":true,"type":"integer"},"retired_at":{"description":"When the location was retired. Null for an active location.","format":"date-time","nullable":true,"type":"string"},"updated_at":{"description":"When the record was last changed (UTC).","format":"date-time","type":"string"}},"required":["id","name","barcode","parent_location_id","retired_at","created_at","updated_at"],"type":"object"},"LocationList":{"additionalProperties":false,"description":"A page of Location records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/Location"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"LocationRecord":{"additionalProperties":false,"description":"One Location record.","properties":{"data":{"$ref":"#/components/schemas/Location"},"meta":{"$ref":"#/components/schemas/RecordMeta"}},"required":["data"],"type":"object"},"Manufacturer":{"additionalProperties":false,"description":"A manufacturer.","properties":{"created_at":{"description":"When the record was created (UTC).","format":"date-time","type":"string"},"id":{"description":"The record's id.","type":"integer"},"name":{"description":"The manufacturer's name.","nullable":true,"type":"string"},"retired_at":{"description":"When the manufacturer was retired. Null for an active manufacturer.","format":"date-time","nullable":true,"type":"string"},"updated_at":{"description":"When the record was last changed (UTC).","format":"date-time","type":"string"}},"required":["id","name","retired_at","created_at","updated_at"],"type":"object"},"ManufacturerList":{"additionalProperties":false,"description":"A page of Manufacturer records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/Manufacturer"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"Model":{"additionalProperties":false,"description":"A model.","properties":{"created_at":{"description":"When the record was created (UTC).","format":"date-time","type":"string"},"id":{"description":"The record's id.","type":"integer"},"manufacturer":{"allOf":[{"$ref":"#/components/schemas/Ref"}],"description":"The model's manufacturer.","nullable":true},"name":{"description":"The model's name.","nullable":true,"type":"string"},"retired_at":{"description":"When the model was retired. Null for an active model.","format":"date-time","nullable":true,"type":"string"},"updated_at":{"description":"When the record was last changed (UTC).","format":"date-time","type":"string"}},"required":["id","name","manufacturer","retired_at","created_at","updated_at"],"type":"object"},"ModelList":{"additionalProperties":false,"description":"A page of Model records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/Model"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"PageMeta":{"additionalProperties":false,"description":"Pagination for a list, plus the meta a list of that kind adds.","properties":{"columns":{"description":"The report's columns, in order. Present on a saved report's results.","items":{"description":"A column.","enum":["barcode","asset_number","serial_number","category","location","department","manufacturer","model","status","next_service_date","next_calibration_due","certification_expiry","warranty_expiry","date_acquired","amperage"],"type":"string"},"type":"array"},"page":{"description":"The page returned, from 1.","type":"integer"},"per_page":{"description":"Records per page, after the cap for this key is applied.","type":"integer"},"total_count":{"description":"Records across all pages.","type":"integer"},"total_pages":{"description":"Pages in total; 0 when there are no records.","type":"integer"},"truncated_fields":{"description":"Paths, from the response root, of values that were shortened. Present for assistant keys only.","items":{"type":"string"},"type":"array"},"untrusted_fields":{"description":"Paths, relative to each record, of the values people or vendors wrote. Present for assistant keys only.","items":{"type":"string"},"type":"array"},"untrusted_note":{"description":"A one-line statement that the values at untrusted_fields were written by people or vendors. Present for assistant keys only.","type":"string"},"window":{"description":"The due window the list covers. Present on the due-for-service and due-for-calibration lists.","enum":["overdue","due_soon","upcoming"],"type":"string"}},"required":["page","per_page","total_count","total_pages"],"type":"object"},"Person":{"additionalProperties":false,"description":"An active person of the organization: the id and the name only.","properties":{"id":{"description":"The person's id.","type":"integer"},"name":{"description":"The person's full name.","nullable":true,"type":"string"}},"required":["id","name"],"type":"object"},"PersonList":{"additionalProperties":false,"description":"A page of Person records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/Person"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"PersonRef":{"additionalProperties":false,"description":"A reference to a person: the id and the name only.","properties":{"id":{"description":"The person's id.","type":"integer"},"name":{"description":"The person's full name. Null when the person belongs to another organization.","nullable":true,"type":"string"}},"required":["id","name"],"type":"object"},"PostedBy":{"additionalProperties":false,"description":"Who posted the record: a person, or an integration token.","properties":{"id":{"description":"The person's or the integration token's id.","type":"integer"},"name":{"description":"The person's full name or the integration's name. Null when it belongs to another organization.","nullable":true,"type":"string"},"type":{"description":"Whether a person or an integration token posted it.","enum":["user","integration"],"type":"string"}},"required":["type","id","name"],"type":"object"},"RecordMeta":{"additionalProperties":false,"description":"The meta of a single-record response. Present for assistant keys only.","properties":{"dry_run":{"description":"true when the request was a dry run (dry_run=true): data is the answer the write would give, and nothing was changed. Present on a dry run only. Present for assistant keys only.","type":"boolean"},"outcome":{"description":"What the write did, on the writes that report it: created (a new record), already_down (the asset was already down, so nothing was written), closed (the open downtime incident was closed), already_up (the asset had no open incident, so nothing was written) or unchanged (the flag was already as the change would leave it, so nothing was written). Present for assistant keys only.","enum":["created","already_down","closed","already_up","unchanged"],"type":"string"},"truncated_fields":{"description":"Paths, from the response root, of values that were shortened. Present for assistant keys only.","items":{"type":"string"},"type":"array"},"untrusted_fields":{"description":"Paths, relative to each record, of the values people or vendors wrote. Present for assistant keys only.","items":{"type":"string"},"type":"array"},"untrusted_note":{"description":"A one-line statement that the values at untrusted_fields were written by people or vendors. Present for assistant keys only.","type":"string"}},"type":"object"},"Ref":{"additionalProperties":false,"description":"A reference to another record of the organization.","properties":{"id":{"description":"The record's id.","type":"integer"},"name":{"description":"The record's name. Null when the record belongs to another organization.","nullable":true,"type":"string"}},"required":["id","name"],"type":"object"},"Report":{"additionalProperties":false,"description":"A saved report.","properties":{"columns":{"description":"The report's columns, as the report registry allows them.","items":{"description":"A column.","enum":["barcode","asset_number","serial_number","category","location","department","manufacturer","model","status","next_service_date","next_calibration_due","certification_expiry","warranty_expiry","date_acquired","amperage"],"type":"string"},"type":"array"},"created_at":{"description":"When the record was created (UTC).","format":"date-time","type":"string"},"id":{"description":"The record's id.","type":"integer"},"name":{"description":"The report's name, as its author wrote it.","nullable":true,"type":"string"},"report_type":{"description":"The report's type. Null when the saved definition is no longer valid.","enum":["category","location","maintenance","compliance","warranty","equipment_amperages"],"nullable":true,"type":"string"},"updated_at":{"description":"When the record was last changed (UTC).","format":"date-time","type":"string"}},"required":["id","name","report_type","columns","created_at","updated_at"],"type":"object"},"ReportList":{"additionalProperties":false,"description":"A page of Report records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/Report"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"ReportRow":{"additionalProperties":false,"description":"One asset's row of a saved report.","properties":{"id":{"description":"The asset's id.","type":"integer"},"values":{"additionalProperties":false,"description":"The row's value for each of the report's columns (meta.columns).","properties":{"amperage":{"description":"The amperage column.","nullable":true,"type":"string"},"asset_number":{"description":"The asset number column.","nullable":true,"type":"string"},"barcode":{"description":"The barcode column.","nullable":true,"type":"string"},"category":{"description":"The category column.","nullable":true,"type":"string"},"certification_expiry":{"description":"The certification expiry column.","format":"date","nullable":true,"type":"string"},"date_acquired":{"description":"The date acquired column.","format":"date","nullable":true,"type":"string"},"department":{"description":"The department column.","nullable":true,"type":"string"},"location":{"description":"The location column.","nullable":true,"type":"string"},"manufacturer":{"description":"The manufacturer column.","nullable":true,"type":"string"},"model":{"description":"The model column.","nullable":true,"type":"string"},"next_calibration_due":{"description":"The next calibration due column.","format":"date","nullable":true,"type":"string"},"next_service_date":{"description":"The next service date column.","format":"date","nullable":true,"type":"string"},"serial_number":{"description":"The serial number column.","nullable":true,"type":"string"},"status":{"description":"The status column.","nullable":true,"type":"string"},"warranty_expiry":{"description":"The warranty expiry column.","format":"date","nullable":true,"type":"string"}},"type":"object"}},"required":["id","values"],"type":"object"},"ReportRowList":{"additionalProperties":false,"description":"A page of ReportRow records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/ReportRow"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"SearchResult":{"additionalProperties":false,"description":"One search hit: the record's type, its id, and the record in that type's standard representation.","properties":{"id":{"description":"The record's id.","type":"integer"},"record":{"anyOf":[{"$ref":"#/components/schemas/Equipment"},{"$ref":"#/components/schemas/ServiceAppointment"},{"$ref":"#/components/schemas/CalibrationRecord"},{"$ref":"#/components/schemas/Vendor"},{"$ref":"#/components/schemas/Location"}],"description":"The record, as that type's own read returns it to a key without extra scopes."},"type":{"description":"The record's type.","enum":["equipment","service_appointment","calibration_record","vendor","location"],"type":"string"}},"required":["type","id","record"],"type":"object"},"SearchResultList":{"additionalProperties":false,"description":"A page of SearchResult records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/SearchResult"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"ServiceAppointment":{"additionalProperties":false,"description":"A service appointment.","properties":{"appointment_type":{"description":"The kind of visit. Null when the visit is unclassified.","enum":["preventive","corrective"],"nullable":true,"type":"string"},"cost":{"description":"The cost, as a decimal string with two places.","nullable":true,"type":"string"},"created_at":{"description":"When the record was created (UTC). Null in a dry run's answer (meta.dry_run true), where nothing was saved.","format":"date-time","nullable":true,"type":"string"},"end_date":{"description":"When the visit ends.","format":"date-time","nullable":true,"type":"string"},"equipment":{"allOf":[{"$ref":"#/components/schemas/EquipmentRef"}],"description":"The asset the visit is for.","nullable":true},"id":{"description":"The record's id. Null in a dry run's answer (meta.dry_run true), where nothing was saved.","nullable":true,"type":"integer"},"notes":{"description":"The appointment notes, as their author wrote them.","nullable":true,"type":"string"},"outcome":{"description":"Whether the visit passed. Null when no outcome is recorded. Present for assistant keys only.","enum":["completed","failed"],"nullable":true,"type":"string"},"outcome_note":{"description":"The note recorded with the outcome. Present for assistant keys only.","nullable":true,"type":"string"},"posted_by":{"allOf":[{"$ref":"#/components/schemas/PostedBy"}],"description":"Who booked the visit.","nullable":true},"start_date":{"description":"When the visit starts.","format":"date-time","nullable":true,"type":"string"},"updated_at":{"description":"When the record was last changed (UTC). Null in a dry run's answer (meta.dry_run true), where nothing was saved.","format":"date-time","nullable":true,"type":"string"},"vendor":{"allOf":[{"$ref":"#/components/schemas/Ref"}],"description":"The vendor making the visit.","nullable":true}},"required":["id","appointment_type","start_date","end_date","cost","notes","equipment","vendor","posted_by","created_at","updated_at"],"type":"object"},"ServiceAppointmentList":{"additionalProperties":false,"description":"A page of ServiceAppointment records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/ServiceAppointment"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"ServiceAppointmentRecord":{"additionalProperties":false,"description":"One ServiceAppointment record.","properties":{"data":{"$ref":"#/components/schemas/ServiceAppointment"},"meta":{"$ref":"#/components/schemas/RecordMeta"}},"required":["data"],"type":"object"},"ServiceContract":{"additionalProperties":false,"description":"A service contract.","properties":{"active":{"description":"Whether today falls within the contract's dates.","type":"boolean"},"created_at":{"description":"When the record was created (UTC).","format":"date-time","type":"string"},"equipment":{"allOf":[{"$ref":"#/components/schemas/EquipmentRef"}],"description":"The asset the contract covers.","nullable":true},"expiration_date":{"description":"When the contract ends.","format":"date","type":"string"},"id":{"description":"The record's id.","type":"integer"},"number_of_days_between_appointments":{"description":"Days between contracted appointments.","nullable":true,"type":"integer"},"number_of_service_appointments":{"description":"How many service appointments the contract includes.","type":"integer"},"start_date":{"description":"When the contract starts.","format":"date","type":"string"},"updated_at":{"description":"When the record was last changed (UTC).","format":"date-time","type":"string"},"vendor":{"allOf":[{"$ref":"#/components/schemas/Ref"}],"description":"The contracted vendor.","nullable":true}},"required":["id","equipment","vendor","start_date","expiration_date","number_of_service_appointments","number_of_days_between_appointments","active","created_at","updated_at"],"type":"object"},"ServiceContractList":{"additionalProperties":false,"description":"A page of ServiceContract records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/ServiceContract"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"ServiceContractRecord":{"additionalProperties":false,"description":"One ServiceContract record.","properties":{"data":{"$ref":"#/components/schemas/ServiceContract"},"meta":{"$ref":"#/components/schemas/RecordMeta"}},"required":["data"],"type":"object"},"ServiceRecord":{"additionalProperties":false,"description":"An asset's service dates after a recorded service, and the visit whose outcome the service recorded.","properties":{"equipment":{"$ref":"#/components/schemas/EquipmentRef"},"last_service_date":{"description":"The asset's last service date: the day the service was recorded for.","format":"date","nullable":true,"type":"string"},"next_service_date":{"description":"When the asset's next service is due.","format":"date","nullable":true,"type":"string"},"service_appointment":{"additionalProperties":false,"description":"The asset's appointment for that day, when the service recorded its outcome on it. Null when no outcome was recorded.","nullable":true,"properties":{"id":{"description":"The appointment's id.","type":"integer"},"outcome":{"description":"The outcome recorded on the appointment.","enum":["completed","failed"],"nullable":true,"type":"string"}},"required":["id","outcome"],"type":"object"}},"required":["equipment","last_service_date","next_service_date","service_appointment"],"type":"object"},"ServiceRecordRecord":{"additionalProperties":false,"description":"One ServiceRecord record.","properties":{"data":{"$ref":"#/components/schemas/ServiceRecord"},"meta":{"$ref":"#/components/schemas/RecordMeta"}},"required":["data"],"type":"object"},"Vendor":{"additionalProperties":false,"description":"A vendor.","properties":{"contact":{"$ref":"#/components/schemas/VendorContact"},"created_at":{"description":"When the record was created (UTC).","format":"date-time","type":"string"},"id":{"description":"The record's id.","type":"integer"},"name":{"description":"The vendor's name.","nullable":true,"type":"string"},"retired_at":{"description":"When the vendor was retired. Null for an active vendor.","format":"date-time","nullable":true,"type":"string"},"updated_at":{"description":"When the record was last changed (UTC).","format":"date-time","type":"string"}},"required":["id","name","retired_at","created_at","updated_at"],"type":"object"},"VendorContact":{"additionalProperties":false,"description":"The vendor's contact details. Present for assistant keys only. Only for keys approved with contacts:read.","properties":{"email":{"description":"The contact's email address.","nullable":true,"type":"string"},"name":{"description":"The contact's name.","nullable":true,"type":"string"},"phone":{"description":"The contact's phone number.","nullable":true,"type":"string"}},"required":["name","email","phone"],"type":"object"},"VendorList":{"additionalProperties":false,"description":"A page of Vendor records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/Vendor"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"VendorRecord":{"additionalProperties":false,"description":"One Vendor record.","properties":{"data":{"$ref":"#/components/schemas/Vendor"},"meta":{"$ref":"#/components/schemas/RecordMeta"}},"required":["data"],"type":"object"},"WebhookDelivery":{"additionalProperties":false,"description":"One delivery of an event to a webhook subscription. The payload is not included.","properties":{"attempts":{"description":"How many times delivery was attempted.","type":"integer"},"created_at":{"description":"When the record was created (UTC).","format":"date-time","type":"string"},"delivered_at":{"description":"When the event was delivered.","format":"date-time","nullable":true,"type":"string"},"event_id":{"description":"The event's id, the same value the delivery carried.","type":"string"},"event_type":{"description":"The event's type.","enum":["service_appointment.created","service_appointment.updated","equipment.service_due_soon","equipment.service_overdue","equipment.calibration_due_soon","equipment.calibration_overdue","calibration_record.created","document.attached"],"type":"string"},"id":{"description":"The record's id.","type":"integer"},"last_error":{"description":"Why the last attempt failed.","nullable":true,"type":"string"},"last_response_status":{"description":"The HTTP status of the last attempt.","nullable":true,"type":"integer"},"next_attempt_at":{"description":"When the next attempt is scheduled.","format":"date-time","nullable":true,"type":"string"},"status":{"description":"The delivery's state.","enum":["pending","succeeded","failed","abandoned"],"type":"string"},"updated_at":{"description":"When the record was last changed (UTC).","format":"date-time","type":"string"}},"required":["id","event_id","event_type","status","attempts","last_response_status","last_error","next_attempt_at","delivered_at","created_at","updated_at"],"type":"object"},"WebhookDeliveryList":{"additionalProperties":false,"description":"A page of WebhookDelivery records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/WebhookDelivery"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"WebhookSubscription":{"additionalProperties":false,"description":"A webhook subscription.","properties":{"active_since":{"description":"When the subscription became active.","format":"date-time","type":"string"},"consecutive_failures":{"description":"Failed deliveries in a row.","type":"integer"},"created_at":{"description":"When the record was created (UTC).","format":"date-time","type":"string"},"disabled_at":{"description":"When the subscription was disabled.","format":"date-time","nullable":true,"type":"string"},"disabled_reason":{"description":"Why the subscription was disabled.","enum":["failures","token_revoked","token_expired"],"nullable":true,"type":"string"},"event_types":{"description":"The events delivered.","items":{"description":"An event type.","enum":["service_appointment.created","service_appointment.updated","equipment.service_due_soon","equipment.service_overdue","equipment.calibration_due_soon","equipment.calibration_overdue","calibration_record.created","document.attached"],"type":"string"},"type":"array"},"id":{"description":"The record's id.","type":"integer"},"last_failure_at":{"description":"When a delivery last failed.","format":"date-time","nullable":true,"type":"string"},"last_success_at":{"description":"When a delivery last succeeded.","format":"date-time","nullable":true,"type":"string"},"status":{"description":"The subscription's state.","enum":["active","disabled"],"type":"string"},"updated_at":{"description":"When the record was last changed (UTC).","format":"date-time","type":"string"},"url_host":{"description":"The host of the subscription's URL. The full URL is not returned.","type":"string"}},"required":["id","url_host","event_types","status","disabled_reason","disabled_at","consecutive_failures","active_since","last_success_at","last_failure_at","created_at","updated_at"],"type":"object"},"WebhookSubscriptionCreated":{"additionalProperties":false,"description":"A webhook subscription as its registration returns it, with its signing secret.","properties":{"active_since":{"description":"When the subscription became active.","format":"date-time","type":"string"},"consecutive_failures":{"description":"Failed deliveries in a row.","type":"integer"},"created_at":{"description":"When the record was created (UTC).","format":"date-time","type":"string"},"disabled_at":{"description":"When the subscription was disabled.","format":"date-time","nullable":true,"type":"string"},"disabled_reason":{"description":"Why the subscription was disabled.","enum":["failures","token_revoked","token_expired"],"nullable":true,"type":"string"},"event_types":{"description":"The events delivered.","items":{"description":"An event type.","enum":["service_appointment.created","service_appointment.updated","equipment.service_due_soon","equipment.service_overdue","equipment.calibration_due_soon","equipment.calibration_overdue","calibration_record.created","document.attached"],"type":"string"},"type":"array"},"id":{"description":"The record's id.","type":"integer"},"last_failure_at":{"description":"When a delivery last failed.","format":"date-time","nullable":true,"type":"string"},"last_success_at":{"description":"When a delivery last succeeded.","format":"date-time","nullable":true,"type":"string"},"secret":{"description":"The signing secret, shown once in the first response only. Null on a replay of the same Idempotency-Key.","nullable":true,"type":"string"},"status":{"description":"The subscription's state.","enum":["active","disabled"],"type":"string"},"updated_at":{"description":"When the record was last changed (UTC).","format":"date-time","type":"string"},"url_host":{"description":"The host of the subscription's URL. The full URL is not returned.","type":"string"}},"required":["id","url_host","event_types","status","disabled_reason","disabled_at","consecutive_failures","active_since","last_success_at","last_failure_at","created_at","updated_at","secret"],"type":"object"},"WebhookSubscriptionCreatedRecord":{"additionalProperties":false,"description":"One WebhookSubscriptionCreated record.","properties":{"data":{"$ref":"#/components/schemas/WebhookSubscriptionCreated"},"meta":{"$ref":"#/components/schemas/RecordMeta"}},"required":["data"],"type":"object"},"WebhookSubscriptionList":{"additionalProperties":false,"description":"A page of WebhookSubscription records.","properties":{"data":{"description":"The page's records.","items":{"$ref":"#/components/schemas/WebhookSubscription"},"type":"array"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"],"type":"object"},"WebhookSubscriptionRecord":{"additionalProperties":false,"description":"One WebhookSubscription record.","properties":{"data":{"$ref":"#/components/schemas/WebhookSubscription"},"meta":{"$ref":"#/components/schemas/RecordMeta"}},"required":["data"],"type":"object"}},"securitySchemes":{"BearerAuth":{"description":"An integration token (ldk_...), a personal API token, or an assistant key (ldk_ai_...), sent as Authorization: Bearer <token>. A token anywhere in the URL is refused with 400 token_in_url.","scheme":"bearer","type":"http"}}},"info":{"description":"The LabDesk API reads and updates an organization's equipment records: assets, notes, service appointments, calibration records, service contracts, vendors, locations, departments and webhook subscriptions, and further reads for assistant keys. The human guide is at /api/docs.\n\nAuthentication: every request carries Authorization: Bearer <token>. Three kinds of token are accepted: integration tokens (ldk_...), personal API tokens, and assistant keys (ldk_ai_...). A token anywhere in the URL is refused with 400 token_in_url.\n\nEnabling: LabDesk turns the API on per organization (the public_api feature); until then every operation answers 403 feature_disabled. An assistant key also needs assistant access (the ai_access feature) turned on for its organization.\n\nAssistant keys receive a narrower response profile. Personal email addresses and phone numbers, network and IT details, and credentials are not returned to them; a vendor's contact details appear only for a key approved with contacts:read. Text that people or vendors wrote is returned as they wrote it, after invisible characters (zero-width, bidirectional-control, tag and other format and control characters) are removed; a name, filename or other short value longer than 200 characters, and a note, description or other long value longer than 2,000 characters, is shortened to that length, ending in …. Each response's meta lists those values: untrusted_fields (their paths, relative to each record), untrusted_note (a one-line statement that people or vendors wrote them) and truncated_fields (the paths, from the response root, of the values that were shortened). A list returns at most 50 records per page. A query parameter the operation does not accept answers 422 unknown_parameter, with error.details.allowed_parameters listing the ones it does accept; other tokens ignore such a parameter.\n\nOperations described as for assistant keys only answer 404 not_found to every other token, the same response an unknown path gives.\n\nDates: Dates and times without an offset are read in your organization's time zone (Pacific today) for assistant keys, and as UTC for other tokens; a value with Z or an offset is used as given.","title":"LabDesk API","version":"v1"},"openapi":"3.0.3","paths":{"/api/v1/attention_items":{"get":{"description":"Lists your organization's assets whose service, calibration or warranty date is past or falls within the next 90 days: the worklist the Attention page shows, one row per asset and due type, highest rank_score first. rank_score is severity_weight (calibration 3, service 2, warranty 1), times 2 for a reference standard, times overdue_days plus 90; overdue_days is negative for a date still ahead. Disposed and deleted assets are not listed. 50 at most per page. Available to assistant keys only; any other token receives 404 not_found. Asset barcodes and names are returned as people wrote them, after invisible characters are removed and values longer than 200 characters are shortened; meta.untrusted_fields lists the fields that hold such text.","operationId":"listAttentionItems","parameters":[{"description":"Only rows of this due type. One of: service, calibration, warranty.","example":"service","in":"query","name":"due_type","required":false,"schema":{"enum":["service","calibration","warranty"],"type":"string"}},{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"equipment":{"id":1001,"barcode":"EQ-1042","name":"Docs example asset"},"due_type":"calibration","due_date":"2026-01-10","overdue_days":5,"severity_weight":3,"reference_standard":false,"rank_score":285},{"equipment":{"id":1001,"barcode":"EQ-1042","name":"Docs example asset"},"due_type":"service","due_date":"2026-01-01","overdue_days":14,"severity_weight":2,"reference_standard":false,"rank_score":208}],"meta":{"page":1,"per_page":25,"total_count":2,"total_pages":1,"untrusted_fields":["equipment.barcode","equipment.name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/AttentionItemList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List attention items","tags":["Attention"]}},"/api/v1/calibration_records":{"get":{"description":"Lists your organization's calibration records, in id order. Read-only: the API has no write operation for calibration records.","operationId":"listCalibrationRecords","parameters":[{"description":"Only records for this equipment id.","example":1002,"in":"query","name":"equipment_id","required":false,"schema":{"type":"integer"}},{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"One of: pass, fail, limited.","example":"pass","in":"query","name":"result","required":false,"schema":{"enum":["pass","fail","limited"],"type":"string"}},{"description":"Only records updated at or after this instant. Dates and times without an offset are read in your organization's time zone (Pacific today) for assistant keys, and as UTC for other tokens; a value with Z or an offset is used as given.","example":"2026-01-01T00:00:00Z","in":"query","name":"updated_since","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1001,"equipment":{"id":1002,"barcode":"EQ-1042","name":"Docs example asset"},"performed_on":"2025-07-15","performed_by":"Docs Technician","result":"pass","as_found":null,"as_left":null,"out_of_tolerance":false,"next_calibration_due":"2026-01-10","traceability_reference":null,"note":null,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1}},"schema":{"$ref":"#/components/schemas/CalibrationRecordList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List calibration records","tags":["Calibration records"]}},"/api/v1/calibration_records/{id}":{"get":{"description":"Returns one calibration record by its id.","operationId":"getCalibrationRecord","parameters":[{"description":"The calibration record's id, as GET /api/v1/calibration_records returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1002,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":1002,"equipment":{"id":1003,"barcode":"EQ-1042","name":"Docs example asset"},"performed_on":"2025-07-15","performed_by":"Docs Technician","result":"pass","as_found":null,"as_left":null,"out_of_tolerance":false,"next_calibration_due":"2026-01-10","traceability_reference":null,"note":null,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}},"schema":{"$ref":"#/components/schemas/CalibrationRecordRecord"}}},"description":"The record."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Get one calibration record","tags":["Calibration records"]}},"/api/v1/categories":{"get":{"description":"Lists your organization's equipment categories, by id. Needs the categories:read scope. At most 50 per page. Available to assistant keys only; any other token receives 404 not_found. Names are returned as people wrote them, after invisible characters are removed and values longer than 200 characters are shortened; meta.untrusted_fields lists the fields that hold such text.","operationId":"listCategories","parameters":[{"description":"true or false. Include retired categories (excluded by default).","example":true,"in":"query","name":"include_retired","required":false,"schema":{"type":"boolean"}},{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1001,"name":"Docs Category","retired_at":null,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1,"untrusted_fields":["name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/CategoryList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List categories","tags":["Lookups"]}},"/api/v1/departments":{"get":{"description":"Lists your organization's departments, in id order.","operationId":"listDepartments","parameters":[{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1001,"name":"Docs Department","created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1}},"schema":{"$ref":"#/components/schemas/DepartmentList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List departments","tags":["Departments"]}},"/api/v1/departments/{id}":{"get":{"description":"Returns one department by its id.","operationId":"getDepartment","parameters":[{"description":"The department's id, as GET /api/v1/departments returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1002,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":1002,"name":"Docs Department","created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}},"schema":{"$ref":"#/components/schemas/DepartmentRecord"}}},"description":"The record."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Get one department","tags":["Departments"]}},"/api/v1/equipment":{"get":{"description":"Lists your organization's equipment, in id order. The barcode filter finds one asset; every filter narrows the list, and several filters together all apply.","operationId":"listEquipment","parameters":[{"description":"Exact match, case-insensitive.","example":"EQ-1042","in":"query","name":"barcode","required":false,"schema":{"type":"string"}},{"description":"Department id, exact match.","example":1003,"in":"query","name":"department_id","required":false,"schema":{"type":"integer"}},{"description":"Location id, exact match.","example":1001,"in":"query","name":"location_id","required":false,"schema":{"type":"integer"}},{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"Assistant keys only: a case-insensitive partial match on nickname, barcode or serial number, up to 200 characters; % and _ match literally. Other tokens ignore it.","example":"Docs example","in":"query","name":"q","required":false,"schema":{"type":"string"}},{"description":"Exact match, case-sensitive.","example":"SN-1042","in":"query","name":"serial_number","required":false,"schema":{"type":"string"}},{"description":"Status name, exact match, case-insensitive.","example":"Active","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"Status id, exact match.","example":1001,"in":"query","name":"status_id","required":false,"schema":{"type":"integer"}},{"description":"Only assets updated at or after this instant. Dates and times without an offset are read in your organization's time zone (Pacific today) for assistant keys, and as UTC for other tokens; a value with Z or an offset is used as given.","example":"2026-01-01T00:00:00Z","in":"query","name":"updated_since","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1004,"barcode":"EQ-1042","serial_number":"SN-1042","asset_number":null,"finance_asset_number":null,"nickname":"Docs example asset","status":{"id":1001,"name":"Active"},"manufacturer":{"id":1001,"name":"Docs Manufacturer 1"},"model":{"id":1001,"name":"Docs Model 1"},"category":{"id":1002,"name":"Docs Category 1"},"subcategory":null,"department":{"id":1003,"name":"Docs Department"},"location":{"id":1001,"name":"Docs Lab"},"assigned_user":null,"assigned_to_name":null,"parent_id":null,"is_reference_standard":false,"gxp":false,"date_acquired":null,"warranty_expiry":null,"end_of_support_date":null,"eol_date":null,"last_service_date":null,"next_service_date":"2026-01-01","service_interval_days":null,"next_calibration_due":"2026-01-10","calibration_interval_days":null,"no_longer_calibratable":false,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1}},"schema":{"$ref":"#/components/schemas/EquipmentList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List equipment","tags":["Equipment"]}},"/api/v1/equipment/due_for_calibration":{"get":{"description":"Lists your organization's equipment whose next scheduled calibration falls within the given window, in id order; meta.window names the window applied.","operationId":"listEquipmentDueForCalibration","parameters":[{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"overdue (default), due_soon (the next 30 days), or upcoming (31-90 days out).","example":"overdue","in":"query","name":"window","required":false,"schema":{"enum":["overdue","due_soon","upcoming"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1005,"barcode":"EQ-1042","serial_number":"SN-1042","asset_number":null,"finance_asset_number":null,"nickname":"Docs example asset","status":{"id":1002,"name":"Active"},"manufacturer":{"id":1002,"name":"Docs Manufacturer 2"},"model":{"id":1002,"name":"Docs Model 2"},"category":{"id":1003,"name":"Docs Category 2"},"subcategory":null,"department":{"id":1004,"name":"Docs Department"},"location":{"id":1002,"name":"Docs Lab"},"assigned_user":null,"assigned_to_name":null,"parent_id":null,"is_reference_standard":false,"gxp":false,"date_acquired":null,"warranty_expiry":null,"end_of_support_date":null,"eol_date":null,"last_service_date":null,"next_service_date":"2026-01-01","service_interval_days":null,"next_calibration_due":"2026-01-10","calibration_interval_days":null,"no_longer_calibratable":false,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1,"window":"overdue"}},"schema":{"$ref":"#/components/schemas/EquipmentList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List equipment due for calibration","tags":["Equipment"]}},"/api/v1/equipment/due_for_service":{"get":{"description":"Lists your organization's equipment whose next scheduled service falls within the given window, in id order; meta.window names the window applied.","operationId":"listEquipmentDueForService","parameters":[{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"overdue (default), due_soon (the next 30 days), or upcoming (31-90 days out).","example":"overdue","in":"query","name":"window","required":false,"schema":{"enum":["overdue","due_soon","upcoming"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1006,"barcode":"EQ-1042","serial_number":"SN-1042","asset_number":null,"finance_asset_number":null,"nickname":"Docs example asset","status":{"id":1003,"name":"Active"},"manufacturer":{"id":1003,"name":"Docs Manufacturer 3"},"model":{"id":1003,"name":"Docs Model 3"},"category":{"id":1004,"name":"Docs Category 3"},"subcategory":null,"department":{"id":1005,"name":"Docs Department"},"location":{"id":1003,"name":"Docs Lab"},"assigned_user":null,"assigned_to_name":null,"parent_id":null,"is_reference_standard":false,"gxp":false,"date_acquired":null,"warranty_expiry":null,"end_of_support_date":null,"eol_date":null,"last_service_date":null,"next_service_date":"2026-01-01","service_interval_days":null,"next_calibration_due":"2026-01-10","calibration_interval_days":null,"no_longer_calibratable":false,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1,"window":"overdue"}},"schema":{"$ref":"#/components/schemas/EquipmentList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List equipment due for service","tags":["Equipment"]}},"/api/v1/equipment/{equipment_id}/documents":{"get":{"description":"Lists the documents filed on one asset, newest filed first, 50 at most per page, as metadata only: the file's name, content type and size in bytes, when it was filed, and the service-report result recorded on it (passed or failed; null when none is recorded or your organization does not record service-report results). No link to the file and none of its text is returned. Available to assistant keys only; any other token receives 404 not_found. Text people wrote is returned as they wrote it, after invisible characters are removed and long values are shortened; meta.untrusted_fields lists the fields that hold such text.","operationId":"listEquipmentDocuments","parameters":[{"description":"The asset's id, as GET /api/v1/equipment returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1007,"in":"path","name":"equipment_id","required":true,"schema":{"type":"integer"}},{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1001,"filename":"Service report 2026-01.pdf","content_type":"application/pdf","byte_size":25,"filed_at":"2026-01-15T15:00:00Z","service_report_result":null}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1,"untrusted_fields":["content_type","filename"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/EquipmentDocumentList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List an asset's documents","tags":["Documents"]}},"/api/v1/equipment/{equipment_id}/downtime_incidents":{"get":{"description":"Lists the times one asset was reported down, newest first, 50 at most per page: when it went down, when it was marked back up, how long it was down (up to now for an incident still ongoing), the note left with the report, and who reported it and who marked it back up. Where downtime reporting is not turned on for your organization this answers 403 feature_disabled. Available to assistant keys only; any other token receives 404 not_found. Text people wrote is returned as they wrote it, after invisible characters are removed and long values are shortened; meta.untrusted_fields lists the fields that hold such text.","operationId":"listEquipmentDowntimeIncidents","parameters":[{"description":"The asset's id, as GET /api/v1/equipment returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1008,"in":"path","name":"equipment_id","required":true,"schema":{"type":"integer"}},{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1001,"down_at":"2026-01-15T13:00:00Z","up_at":"2026-01-15T14:00:00Z","ongoing":false,"duration_seconds":3600,"note":"Compressor alarm; the vendor was called.","reported_by":{"id":1001,"name":"Docs Technician"},"marked_up_by":{"id":1002,"name":"Docs Lab Manager"},"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1,"untrusted_fields":["marked_up_by.name","note","reported_by.name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/DowntimeIncidentList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List an asset's downtime incidents","tags":["Downtime"]},"post":{"description":"Reports one asset of your organization down, as reporting it down on the phone or the equipment page does: a downtime incident opens with the note, one audit entry records it, and the asset's owner is emailed (unless the person reporting is that owner), or your organization's Administrators when the asset has no owner. A new report answers 201 with the incident and meta.outcome \"created\". An asset that is already down keeps its one open incident: the answer is 200 with that incident and meta.outcome \"already_down\", and nothing is written. It needs both service request capture and downtime reporting turned on for your organization, as the equipment page's Report down and Mark back up buttons do; with either off it answers 403 feature_disabled, whatever the asset. A disposed asset is refused with 422. Available to assistant keys only; any other token receives 404 not_found. An Idempotency-Key header is required: a retry with the same key and body returns the first answer instead of writing again. With dry_run=true the request is checked and the answer it would give is returned with meta.dry_run true, and nothing is changed and no one is notified. A body field not listed here is refused with 422 unknown_field.","operationId":"reportEquipmentDown","parameters":[{"description":"Required: a write without it answers 400 idempotency_key_required. 1 to 255 printable ASCII characters naming this write. A retry with the same key and the same body, within 24 hours, returns the response stored for the first request, with the header Idempotent-Replayed: true, and writes nothing again. The same key with a different body answers 422 idempotency_key_reused; a retry while the first request is still running answers 409 idempotency_conflict; a malformed key answers 400 invalid_idempotency_key. A key belongs to the token that sent it and spans every operation. A dry run (dry_run=true) neither stores nor replays a response for its key.","example":"LAB-150-down","in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string"}},{"description":"true checks the request and returns the result it would have, and changes nothing. Assistant keys only.","example":true,"in":"query","name":"dry_run","required":false,"schema":{"type":"boolean"}},{"description":"The asset's id, as GET /api/v1/equipment returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1009,"in":"path","name":"equipment_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"note":"The compressor tripped and the alarm is sounding."},"schema":{"additionalProperties":false,"description":"The body fields this write accepts. A field not listed here is refused with 422 unknown_field.","properties":{"note":{"description":"A string of up to 500 characters with no NUL character, saying what is wrong; it is shown with the incident and in the email. Absent or null reports the asset down with no note.","example":"The compressor tripped and the alarm is sounding.","maxLength":500,"nullable":true,"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":null,"down_at":"2026-01-15T15:00:00Z","up_at":null,"ongoing":true,"duration_seconds":0,"note":"The compressor tripped and the alarm is sounding.","reported_by":{"id":1003,"name":"Docs Assistant"},"marked_up_by":null,"created_at":null,"updated_at":null},"meta":{"dry_run":true,"outcome":"created","untrusted_fields":["note","reported_by.name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/DowntimeIncidentRecord"}}},"description":"Nothing was created: the answer to a dry run (meta.dry_run true, id null), or the reason meta.outcome names."},"201":{"content":{"application/json":{"example":{"data":{"id":1002,"note":"The compressor tripped and the alarm is sounding.","up_at":null,"down_at":"2026-01-15T15:00:00Z","ongoing":true,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z","reported_by":{"id":1004,"name":"Docs Assistant"},"marked_up_by":null,"duration_seconds":0},"meta":{"outcome":"created","untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[],"untrusted_fields":["note","reported_by.name"]}},"schema":{"$ref":"#/components/schemas/DowntimeIncidentRecord"}}},"description":"The record was created. A replay of the same Idempotency-Key returns the stored response."},"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"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Report an asset down","tags":["Downtime"]}},"/api/v1/equipment/{equipment_id}/downtime_incidents/current":{"patch":{"description":"Marks one asset of your organization back up, as marking it back up on the phone or the equipment page does: its open downtime incident closes with the time and who marked it up, and one audit entry records how long it was down. The answer is 200 with the closed incident and meta.outcome \"closed\", or, when the asset has no open incident, 200 with data null and meta.outcome \"already_up\", and nothing is written. It needs both service request capture and downtime reporting turned on for your organization, as the equipment page's Report down and Mark back up buttons do; with either off it answers 403 feature_disabled, whatever the asset. A disposed asset is refused with 422. Available to assistant keys only; any other token receives 404 not_found. An Idempotency-Key header is required: a retry with the same key and body returns the first answer instead of writing again. With dry_run=true the request is checked and the answer it would give is returned with meta.dry_run true, and nothing is changed and no one is notified. The request takes no body; any body field is refused with 422 unknown_field.","operationId":"markEquipmentUp","parameters":[{"description":"Required: a write without it answers 400 idempotency_key_required. 1 to 255 printable ASCII characters naming this write. A retry with the same key and the same body, within 24 hours, returns the response stored for the first request, with the header Idempotent-Replayed: true, and writes nothing again. The same key with a different body answers 422 idempotency_key_reused; a retry while the first request is still running answers 409 idempotency_conflict; a malformed key answers 400 invalid_idempotency_key. A key belongs to the token that sent it and spans every operation. A dry run (dry_run=true) neither stores nor replays a response for its key.","example":"LAB-150-up","in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string"}},{"description":"true checks the request and returns the result it would have, and changes nothing. Assistant keys only.","example":true,"in":"query","name":"dry_run","required":false,"schema":{"type":"boolean"}},{"description":"The asset's id, as GET /api/v1/equipment returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1010,"in":"path","name":"equipment_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":1003,"down_at":"2026-01-15T13:00:00Z","up_at":"2026-01-15T15:00:00Z","ongoing":false,"duration_seconds":7200,"note":"Compressor tripped.","reported_by":{"id":1005,"name":"Docs Assistant"},"marked_up_by":{"id":1005,"name":"Docs Assistant"},"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"},"meta":{"outcome":"closed","untrusted_fields":["marked_up_by.name","note","reported_by.name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/DowntimeIncidentRecord"}}},"description":"The record after the write, or as the write would leave it when meta.dry_run is true."},"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"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Mark an asset back up","tags":["Downtime"]}},"/api/v1/equipment/{equipment_id}/flags":{"get":{"description":"Lists the flags raised on one asset, newest first, 50 at most per page. Available to assistant keys only; any other token receives 404 not_found. Text people wrote is returned as they wrote it, after invisible characters are removed and long values are shortened; meta.untrusted_fields lists the fields that hold such text.","operationId":"listEquipmentFlags","parameters":[{"description":"The asset's id, as GET /api/v1/equipment returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1011,"in":"path","name":"equipment_id","required":true,"schema":{"type":"integer"}},{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"true for resolved flags only, false for open flags only.","example":false,"in":"query","name":"resolved","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1001,"subject":"Door seal worn","equipment":{"id":1011,"barcode":"EQ-1042","name":"Docs example asset"},"submitter":{"id":1006,"name":"Docs Technician"},"recipient":{"id":1007,"name":"Docs Lab Manager"},"resolved_by":null,"resolved":false,"date_created":"2026-01-15T15:00:00Z","date_marked_resolved":null,"notes_count":1,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1,"untrusted_fields":["equipment.barcode","equipment.name","recipient.name","subject","submitter.name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/FlagList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List an asset's flags","tags":["Flags"]},"post":{"description":"Raises a flag on one asset of your organization, as raising a flag in LabDesk does: the key's user is its submitter, note becomes its first note, and the recipient receives the same flag email a flag raised in LabDesk sends, once. recipient_id names an active person of your organization; without it the flag goes to the first holder of the organization's Administrator role, and an organization with no such holder answers 422 on recipient_id. LabDesk staff are never a recipient. A disposed asset answers 422. One audit entry records the flag's ids, never its text. The answer is the flag with its notes, and its Location is the flag. Available to assistant keys only; any other token receives 404 not_found. An Idempotency-Key header is required: a retry with the same key and body returns the first answer and sends no second email. With dry_run=true the request is checked and the flag it would raise is returned with id null and meta.dry_run true; nothing is saved and no email is sent. A body field not listed here is refused with 422 unknown_field.","operationId":"createEquipmentFlag","parameters":[{"description":"Required: a write without it answers 400 idempotency_key_required. 1 to 255 printable ASCII characters naming this write. A retry with the same key and the same body, within 24 hours, returns the response stored for the first request, with the header Idempotent-Replayed: true, and writes nothing again. The same key with a different body answers 422 idempotency_key_reused; a retry while the first request is still running answers 409 idempotency_conflict; a malformed key answers 400 invalid_idempotency_key. A key belongs to the token that sent it and spans every operation. A dry run (dry_run=true) neither stores nor replays a response for its key.","example":"LAB-150-flag","in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string"}},{"description":"true checks the request and returns the result it would have, and changes nothing. Assistant keys only.","example":true,"in":"query","name":"dry_run","required":false,"schema":{"type":"boolean"}},{"description":"The asset's id, as GET /api/v1/equipment returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1012,"in":"path","name":"equipment_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"subject":"Compressor running loud","note":"A grinding noise started this morning.","recipient_id":1001},"schema":{"additionalProperties":false,"description":"The body fields this write accepts. A field not listed here is refused with 422 unknown_field.","properties":{"note":{"description":"A string of up to 10,000 characters with no NUL character, posted as the flag's first note and included in the flag email. Absent, null or blank posts no note.","example":"A grinding noise started this morning.","maxLength":10000,"nullable":true,"type":"string"},"recipient_id":{"description":"The id of an active person of your organization, as GET /api/v1/users returns it, who receives the flag. Another organization's person, LabDesk staff, a removed person and an unknown id all answer the same 422. Absent or null sends the flag to the first holder of the organization's Administrator role.","example":1001,"nullable":true,"type":"integer"},"subject":{"description":"A string of up to 255 characters with no NUL character and not blank: what the flag is about.","example":"Compressor running loud","maxLength":255,"type":"string"}},"required":["subject"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":null,"subject":"Compressor running loud","equipment":{"id":1013,"barcode":"EQ-1042","name":"Docs example asset"},"submitter":{"id":1008,"name":"Docs Assistant"},"recipient":{"id":1009,"name":"Docs Lab Manager"},"resolved_by":null,"resolved":false,"date_created":"2026-01-15T15:00:00Z","date_marked_resolved":null,"notes_count":1,"created_at":null,"updated_at":null,"notes":[{"id":null,"note":"A grinding noise started this morning.","posted_by":{"type":"user","id":1008,"name":"Docs Assistant"},"date_posted":"2026-01-15T15:00:00Z"}]},"meta":{"dry_run":true,"untrusted_fields":["equipment.barcode","equipment.name","notes[].note","notes[].posted_by.name","recipient.name","subject","submitter.name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/FlagRecord"}}},"description":"Nothing was created: the answer to a dry run (meta.dry_run true, id null), or the reason meta.outcome names."},"201":{"content":{"application/json":{"example":{"data":{"id":1002,"notes":[{"id":1001,"note":"A grinding noise started this morning.","posted_by":{"id":1010,"name":"Docs Assistant","type":"user"},"date_posted":"2026-01-15T15:00:00Z"}],"subject":"Compressor running loud","resolved":false,"equipment":{"id":1012,"name":"Docs example asset","barcode":"EQ-1042"},"recipient":{"id":1011,"name":"Docs Lab Manager"},"submitter":{"id":1010,"name":"Docs Assistant"},"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z","notes_count":1,"resolved_by":null,"date_created":"2026-01-15T15:00:00Z","date_marked_resolved":null},"meta":{"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[],"untrusted_fields":["equipment.barcode","equipment.name","notes[].note","notes[].posted_by.name","recipient.name","subject","submitter.name"]}},"schema":{"$ref":"#/components/schemas/FlagRecord"}}},"description":"The record was created. A replay of the same Idempotency-Key returns the stored response."},"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"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Raise a flag on an asset","tags":["Flags"]}},"/api/v1/equipment/{equipment_id}/notes":{"get":{"description":"Lists the notes on one asset, newest first, 50 at most per page. Available to assistant keys only; any other token receives 404 not_found. Note text is returned as people wrote it, after invisible characters are removed and values longer than 2,000 characters are shortened; meta.untrusted_fields lists the fields that hold such text.","operationId":"listEquipmentNotes","parameters":[{"description":"The asset's id, as GET /api/v1/equipment returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1014,"in":"path","name":"equipment_id","required":true,"schema":{"type":"integer"}},{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1001,"note":"Docs example note","equipment":{"id":1014,"barcode":"EQ-1042","name":"Docs example asset"},"posted_by":{"type":"integration","id":1001,"name":"Jira integration"},"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1,"untrusted_fields":["equipment.barcode","equipment.name","note","posted_by.name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/EquipmentNoteList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List an asset's notes","tags":["Notes"]},"post":{"description":"Posts a note on one asset, attributed to the token that sent it: an integration's note appears in LabDesk as \"via integration <name>\". For assistant keys an Idempotency-Key header is required, a body field other than note is refused with 422 unknown_field, a disposed asset is refused with 422, and dry_run=true checks the request and returns the note it would post, with id null, without posting it.","operationId":"createEquipmentNote","parameters":[{"description":"Required for assistant keys, whose write without it answers 400 idempotency_key_required. Optional for other tokens, whose write without it runs once. 1 to 255 printable ASCII characters naming this write. A retry with the same key and the same body, within 24 hours, returns the response stored for the first request, with the header Idempotent-Replayed: true, and writes nothing again. The same key with a different body answers 422 idempotency_key_reused; a retry while the first request is still running answers 409 idempotency_conflict; a malformed key answers 400 invalid_idempotency_key. A key belongs to the token that sent it and spans every operation. A dry run (dry_run=true) neither stores nor replays a response for its key.","example":"LAB-100-note","in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string"}},{"description":"true checks the request and returns the result it would have, and changes nothing. Assistant keys only.","example":true,"in":"query","name":"dry_run","required":false,"schema":{"type":"boolean"}},{"description":"The asset's id, as GET /api/v1/equipment returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1015,"in":"path","name":"equipment_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"note":"Replaced the HVAC filter during the service visit."},"schema":{"description":"The body fields this write accepts. For assistant keys a field not listed here is refused with 422 unknown_field; for other tokens it is ignored.","properties":{"note":{"description":"A non-empty string of up to 10,000 characters with no NUL character: the note's text.","example":"Replaced the HVAC filter during the service visit.","maxLength":10000,"type":"string"}},"required":["note"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":null,"note":"Replaced the HVAC filter during the service visit.","equipment":{"id":1016,"barcode":"EQ-1042","name":"Docs example asset"},"posted_by":{"type":"user","id":1012,"name":"Docs Assistant"},"created_at":null,"updated_at":null},"meta":{"dry_run":true,"untrusted_fields":["equipment.barcode","equipment.name","note","posted_by.name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/EquipmentNoteRecord"}}},"description":"Nothing was created: the answer to a dry run (meta.dry_run true, id null), or the reason meta.outcome names."},"201":{"content":{"application/json":{"example":{"data":{"id":1002,"note":"Replaced the HVAC filter during the service visit.","equipment":{"id":1015,"name":"Docs example asset","barcode":"EQ-1042"},"posted_by":{"id":1002,"name":"Jira integration","type":"integration"},"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}},"schema":{"$ref":"#/components/schemas/EquipmentNoteRecord"}}},"description":"The record was created. A replay of the same Idempotency-Key returns the stored response."},"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"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Add a note to an equipment item","tags":["Notes"]}},"/api/v1/equipment/{equipment_id}/notes/{id}":{"get":{"description":"Returns one note on one asset by its id.","operationId":"getEquipmentNote","parameters":[{"description":"The asset's id, as GET /api/v1/equipment returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1017,"in":"path","name":"equipment_id","required":true,"schema":{"type":"integer"}},{"description":"The note's id, as the note list or the note's creation returns it. A note on another asset answers 404 not_found. An id of another organization answers 404 not_found, the same as an id no record has.","example":1003,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":1003,"note":"Docs example note","equipment":{"id":1017,"barcode":"EQ-1042","name":"Docs example asset"},"posted_by":{"type":"integration","id":1003,"name":"Jira integration"},"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}},"schema":{"$ref":"#/components/schemas/EquipmentNoteRecord"}}},"description":"The record."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Get one equipment note","tags":["Notes"]}},"/api/v1/equipment/{equipment_id}/service_records":{"post":{"description":"Records that one asset of your organization was serviced: its last service date becomes serviced_on, and its next service date becomes next_service_date when that is given, or otherwise moves forward by the asset's service interval, as marking it serviced in LabDesk does. One audit entry records the service and its note. The answer is the asset's service dates after the write; service_appointment is null, because this operation records no visit outcome. Available to assistant keys only; any other token receives 404 not_found. An Idempotency-Key header is required: a retry with the same key and body returns the first answer instead of recording the service again. With dry_run=true the request is checked and the answer it would give is returned with meta.dry_run true, and nothing is changed. A body field not listed here is refused with 422 unknown_field.","operationId":"recordEquipmentService","parameters":[{"description":"Required: a write without it answers 400 idempotency_key_required. 1 to 255 printable ASCII characters naming this write. A retry with the same key and the same body, within 24 hours, returns the response stored for the first request, with the header Idempotent-Replayed: true, and writes nothing again. The same key with a different body answers 422 idempotency_key_reused; a retry while the first request is still running answers 409 idempotency_conflict; a malformed key answers 400 invalid_idempotency_key. A key belongs to the token that sent it and spans every operation. A dry run (dry_run=true) neither stores nor replays a response for its key.","example":"LAB-150-service","in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string"}},{"description":"true checks the request and returns the result it would have, and changes nothing. Assistant keys only.","example":true,"in":"query","name":"dry_run","required":false,"schema":{"type":"boolean"}},{"description":"The asset's id, as GET /api/v1/equipment returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1018,"in":"path","name":"equipment_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"serviced_on":"2026-01-14","note":"Replaced the door seal and checked the compressor.","next_service_date":"2026-07-14","outcome":"completed","outcome_note":"Passed the temperature hold test."},"schema":{"additionalProperties":false,"description":"The body fields this write accepts. A field not listed here is refused with 422 unknown_field.","properties":{"next_service_date":{"description":"A date in the form YYYY-MM-DD that becomes the asset's next service date. Absent or null moves the next service date forward by the asset's service interval.","example":"2026-07-14","format":"date","nullable":true,"type":"string"},"note":{"description":"A string of up to 10,000 characters with no NUL character, kept with the service in the asset's audit trail. Absent or null records no note.","example":"Replaced the door seal and checked the compressor.","maxLength":10000,"nullable":true,"type":"string"},"outcome":{"description":"\"completed\" or \"failed\": how the service visit on that day went. Absent means \"completed\". The outcome is written on the asset's appointment for that day only when the key holds appointments:write and you may edit service appointments; without both, \"completed\" is not recorded and \"failed\" is refused with 403. \"failed\" with no appointment for that day is refused with 422.","enum":["completed","failed"],"example":"completed","nullable":true,"type":"string"},"outcome_note":{"description":"A string of up to 1000 characters explaining the outcome, kept on the appointment with it. Absent or null records no outcome note.","example":"Passed the temperature hold test.","maxLength":1000,"nullable":true,"type":"string"},"serviced_on":{"description":"A date in the form YYYY-MM-DD: the day the asset was serviced. It may not be later than today in your organization's time zone (Pacific today). Absent or null means today.","example":"2026-01-14","format":"date","nullable":true,"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"example":{"data":{"equipment":{"id":1018,"barcode":"EQ-1042","name":"Docs example asset"},"last_service_date":"2026-01-14","next_service_date":"2026-07-14","service_appointment":{"id":1001,"outcome":"completed"}},"meta":{"untrusted_fields":["equipment.barcode","equipment.name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/ServiceRecordRecord"}}},"description":"The record after the write, or as the write would leave it when meta.dry_run is true."},"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"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Record that an asset was serviced","tags":["Service records"]}},"/api/v1/equipment/{id}":{"get":{"description":"Returns one asset of your organization by the id GET /api/v1/equipment returned for it.","operationId":"getEquipment","parameters":[{"description":"The asset's id, as GET /api/v1/equipment returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1019,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":1019,"barcode":"EQ-1042","serial_number":"SN-1042","asset_number":null,"finance_asset_number":null,"nickname":"Docs example asset","status":{"id":1004,"name":"Active"},"manufacturer":{"id":1004,"name":"Docs Manufacturer 4"},"model":{"id":1004,"name":"Docs Model 4"},"category":{"id":1005,"name":"Docs Category 4"},"subcategory":null,"department":{"id":1006,"name":"Docs Department"},"location":{"id":1004,"name":"Docs Lab"},"assigned_user":null,"assigned_to_name":null,"parent_id":null,"is_reference_standard":false,"gxp":false,"date_acquired":null,"warranty_expiry":null,"end_of_support_date":null,"eol_date":null,"last_service_date":null,"next_service_date":"2026-01-01","service_interval_days":null,"next_calibration_due":"2026-01-10","calibration_interval_days":null,"no_longer_calibratable":false,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}},"schema":{"$ref":"#/components/schemas/EquipmentRecord"}}},"description":"The record."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Get one piece of equipment","tags":["Equipment"]},"patch":{"description":"Changes one asset of your organization: its owner, location, department, status, nickname, next service date and service and calibration intervals, and nothing else. Only the fields sent change, and null clears an optional field. Every id names a record of your organization; an id that names none, or a record of another organization, is refused with 422 on that field. Calibration and compliance fields, such as the next calibration due date, the reference-standard flag and certificates, are not writable here: they and any other field not listed are refused with 422 unknown_field. An asset that has been disposed of is refused with 422. A change of owner is recorded in the asset's audit trail and, when your organization syncs calendars, moves the asset's future service appointments to the new owner's calendar, as editing the asset in LabDesk does; every change is audited with the key that made it. The answer is the asset after the write. Available to assistant keys only; any other token receives 404 not_found. An Idempotency-Key header is required: a retry with the same key and body returns the first answer instead of changing the asset again. With dry_run=true the request is checked and the answer it would give is returned with meta.dry_run true, and nothing is changed.","operationId":"updateEquipment","parameters":[{"description":"Required: a write without it answers 400 idempotency_key_required. 1 to 255 printable ASCII characters naming this write. A retry with the same key and the same body, within 24 hours, returns the response stored for the first request, with the header Idempotent-Replayed: true, and writes nothing again. The same key with a different body answers 422 idempotency_key_reused; a retry while the first request is still running answers 409 idempotency_conflict; a malformed key answers 400 invalid_idempotency_key. A key belongs to the token that sent it and spans every operation. A dry run (dry_run=true) neither stores nor replays a response for its key.","example":"LAB-150-move-asset","in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string"}},{"description":"true checks the request and returns the result it would have, and changes nothing. Assistant keys only.","example":true,"in":"query","name":"dry_run","required":false,"schema":{"type":"boolean"}},{"description":"The asset's id, as GET /api/v1/equipment returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1020,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"location_id":1005,"service_interval_days":90},"schema":{"additionalProperties":false,"description":"The body fields this write accepts. A field not listed here is refused with 422 unknown_field.","properties":{"assigned_user_id":{"description":"The id of the person responsible for the asset, who receives its reminders: an active person of your organization, as GET /api/v1/users lists them. LabDesk staff and people who have left are refused. null leaves the asset with no owner.","example":9411,"nullable":true,"type":"integer"},"calibration_interval_days":{"description":"An integer from 1 to 3,650: the days between calibrations. null clears it.","example":365,"nullable":true,"type":"integer"},"department_id":{"description":"The id of a department of your organization. null clears the department.","example":8001,"nullable":true,"type":"integer"},"location_id":{"description":"The id of an active location of your organization, or of the asset's current location even if it has since been retired. null clears the location.","example":1005,"nullable":true,"type":"integer"},"next_service_date":{"description":"A date in the form YYYY-MM-DD. null clears it; an asset with a last service date and a service interval then gets a next service date counted from them, as in LabDesk.","example":"2026-07-01","format":"date","nullable":true,"type":"string"},"nickname":{"description":"A string of up to 255 characters with no NUL character, not used by another asset of your organization. null clears the nickname.","example":"Cold room freezer","maxLength":255,"nullable":true,"type":"string"},"service_interval_days":{"description":"An integer from 1 to 3,650: the days between services. null clears it, and the interval of the asset's category applies.","example":90,"nullable":true,"type":"integer"},"status_id":{"description":"The id of an equipment status, as GET /api/v1/equipment_statuses lists them. A status can never be cleared, so null is refused. Sold and For Discard are refused: they are set when an asset is disposed of.","example":9001,"type":"integer"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":1020,"barcode":"EQ-1042","serial_number":"SN-1042","asset_number":null,"finance_asset_number":null,"nickname":"Docs example asset","status":{"id":1005,"name":"Active"},"manufacturer":{"id":1005,"name":"Docs Manufacturer 5"},"model":{"id":1005,"name":"Docs Model 5"},"category":{"id":1006,"name":"Docs Category 5"},"subcategory":null,"department":{"id":1007,"name":"Docs Department"},"location":{"id":1005,"name":"Docs Lab"},"assigned_user":null,"assigned_to_name":null,"parent_id":null,"is_reference_standard":false,"gxp":false,"date_acquired":null,"warranty_expiry":null,"end_of_support_date":null,"eol_date":null,"last_service_date":null,"next_service_date":"2026-01-01","service_interval_days":90,"next_calibration_due":"2026-01-10","calibration_interval_days":null,"no_longer_calibratable":false,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"},"meta":{"untrusted_fields":["barcode","category.name","department.name","location.name","manufacturer.name","model.name","nickname","serial_number","status.name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/EquipmentRecord"}}},"description":"The record after the write, or as the write would leave it when meta.dry_run is true."},"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"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Change one asset's owner, location, status or service schedule","tags":["Equipment"]}},"/api/v1/equipment_statuses":{"get":{"description":"Lists the equipment statuses, by id. Statuses are one list shared by every organization; a status name is the value GET /api/v1/equipment's status filter takes. Needs the equipment:read scope. At most 50 per page. Available to assistant keys only; any other token receives 404 not_found. Names are returned as people wrote them, after invisible characters are removed and values longer than 200 characters are shortened; meta.untrusted_fields lists the fields that hold such text.","operationId":"listEquipmentStatuses","parameters":[{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1006,"name":"Active"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1,"untrusted_fields":["name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/EquipmentStatusList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List equipment statuses","tags":["Lookups"]}},"/api/v1/failed_service_visits":{"get":{"description":"Lists your organization's assets whose latest recorded service result is a failure: the failed service visits the Attention page shows, most recent service_day first. source is appointment when the asset's latest visit with a recorded outcome failed, or service_report when a failed service report is the asset's latest recorded result (only where your organization records service report results); the matching object is set and the other is null. An asset stays listed until a later visit is recorded completed or a later service report passed. appointment.outcome_note is null unless the key also holds appointments:read and its user may view service appointments. Disposed and deleted assets are not listed. 50 at most per page. Available to assistant keys only; any other token receives 404 not_found. Outcome notes and asset labels are returned as people wrote them, after invisible characters are removed and long values shortened (notes past 2,000 characters); meta.untrusted_fields lists the fields that hold such text.","operationId":"listFailedServiceVisits","parameters":[{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"equipment":{"id":1021,"barcode":"EQ-1042","name":"Docs example asset"},"source":"appointment","service_day":"2026-01-12","recorded_at":"2026-01-15T15:00:00Z","appointment":{"id":1002,"start_date":"2026-01-12T15:00:00Z","outcome":"failed","outcome_note":"Pressure test failed; seal replacement ordered."},"service_report":null}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1,"untrusted_fields":["appointment.outcome_note","equipment.barcode","equipment.name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/FailedServiceVisitList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List failed service visits","tags":["Attention"]}},"/api/v1/flags":{"get":{"description":"Lists the flags raised on your organization's equipment, newest first, 50 at most per page. Each flag names its asset, who raised it, who it is for, whether it is resolved and how many notes it has. Available to assistant keys only; any other token receives 404 not_found. Text people wrote is returned as they wrote it, after invisible characters are removed and long values are shortened; meta.untrusted_fields lists the fields that hold such text.","operationId":"listFlags","parameters":[{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"true for resolved flags only, false for open flags only.","example":false,"in":"query","name":"resolved","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1003,"subject":"Door seal worn","equipment":{"id":1022,"barcode":"EQ-1042","name":"Docs example asset"},"submitter":{"id":1013,"name":"Docs Technician"},"recipient":{"id":1014,"name":"Docs Lab Manager"},"resolved_by":null,"resolved":false,"date_created":"2026-01-15T15:00:00Z","date_marked_resolved":null,"notes_count":1,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1,"untrusted_fields":["equipment.barcode","equipment.name","recipient.name","subject","submitter.name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/FlagList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List flags","tags":["Flags"]}},"/api/v1/flags/{id}":{"get":{"description":"Fetches one flag by its id, with its 50 most recent notes, newest first; notes_count is the number of notes in all. Available to assistant keys only; any other token receives 404 not_found. Text people wrote is returned as they wrote it, after invisible characters are removed and long values are shortened; meta.untrusted_fields lists the fields that hold such text.","operationId":"getFlag","parameters":[{"description":"The flag's id, as GET /api/v1/flags returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1004,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":1004,"subject":"Door seal worn","equipment":{"id":1023,"barcode":"EQ-1042","name":"Docs example asset"},"submitter":{"id":1015,"name":"Docs Technician"},"recipient":{"id":1016,"name":"Docs Lab Manager"},"resolved_by":null,"resolved":false,"date_created":"2026-01-15T15:00:00Z","date_marked_resolved":null,"notes_count":1,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z","notes":[{"id":1002,"note":"The seal is cracked along the lower edge.","posted_by":{"type":"user","id":1015,"name":"Docs Technician"},"date_posted":"2026-01-15T15:00:00Z"}]},"meta":{"untrusted_fields":["equipment.barcode","equipment.name","notes[].note","notes[].posted_by.name","recipient.name","subject","submitter.name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/FlagRecord"}}},"description":"The record."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Get one flag with its notes","tags":["Flags"]},"patch":{"description":"Changes one flag of your organization as updating it in LabDesk does: note posts a note, resolved true resolves the flag (posting \"(marked resolved)\" and naming the key's user as its resolver) and resolved false reopens it (posting \"(reopened flag)\"). The update email goes out once, as for a change made in LabDesk: to the flag's submitter, or to its recipient when the key's user raised the flag. Resolving a resolved flag or reopening an open one with no note changes nothing, sends no email and answers with meta.outcome \"unchanged\". A flag on a disposed asset answers 422. One audit entry records the flag's id and its resolved state before and after, never the note's text. The answer is the flag with its notes. Available to assistant keys only; any other token receives 404 not_found. An Idempotency-Key header is required: a retry with the same key and body returns the first answer and sends no second email. With dry_run=true the request is checked and the flag is returned as the change would leave it, with meta.dry_run true; nothing is saved and no email is sent. A body field not listed here is refused with 422 unknown_field.","operationId":"updateFlag","parameters":[{"description":"Required: a write without it answers 400 idempotency_key_required. 1 to 255 printable ASCII characters naming this write. A retry with the same key and the same body, within 24 hours, returns the response stored for the first request, with the header Idempotent-Replayed: true, and writes nothing again. The same key with a different body answers 422 idempotency_key_reused; a retry while the first request is still running answers 409 idempotency_conflict; a malformed key answers 400 invalid_idempotency_key. A key belongs to the token that sent it and spans every operation. A dry run (dry_run=true) neither stores nor replays a response for its key.","example":"LAB-150-flag-update","in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string"}},{"description":"true checks the request and returns the result it would have, and changes nothing. Assistant keys only.","example":true,"in":"query","name":"dry_run","required":false,"schema":{"type":"boolean"}},{"description":"The flag's id, as GET /api/v1/flags returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1005,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"note":"Replaced the seal; the door closes tight.","resolved":true},"schema":{"additionalProperties":false,"description":"The body fields this write accepts. A field not listed here is refused with 422 unknown_field.","properties":{"note":{"description":"A string of up to 10,000 characters with no NUL character, posted as a note on the flag and included in the update email. Absent, null or blank posts no note.","example":"Replaced the seal; the door closes tight.","maxLength":10000,"nullable":true,"type":"string"},"resolved":{"description":"true or false: true resolves the flag, false reopens it. Absent leaves it as it is; null is refused. A body with neither a note nor resolved answers 422.","example":true,"type":"boolean"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":1005,"subject":"Door seal worn","equipment":{"id":1024,"barcode":"EQ-1042","name":"Docs example asset"},"submitter":{"id":1017,"name":"Docs Technician"},"recipient":{"id":1018,"name":"Docs Lab Manager"},"resolved_by":{"id":1019,"name":"Docs Assistant"},"resolved":true,"date_created":"2026-01-15T15:00:00Z","date_marked_resolved":"2026-01-15T15:00:00Z","notes_count":3,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z","notes":[{"id":1003,"note":"(marked resolved)","posted_by":{"id":1019,"name":"Docs Assistant","type":"user"},"date_posted":"2026-01-15T15:00:00Z"},{"id":1004,"note":"Replaced the seal; the door closes tight.","posted_by":{"id":1019,"name":"Docs Assistant","type":"user"},"date_posted":"2026-01-15T15:00:00Z"},{"id":1005,"note":"The seal is cracked along the lower edge.","posted_by":{"id":1017,"name":"Docs Technician","type":"user"},"date_posted":"2026-01-15T15:00:00Z"}]},"meta":{"untrusted_fields":["equipment.barcode","equipment.name","notes[].note","notes[].posted_by.name","recipient.name","resolved_by.name","subject","submitter.name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/FlagRecord"}}},"description":"The record after the write, or as the write would leave it when meta.dry_run is true."},"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"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Add a note to a flag, resolve it or reopen it","tags":["Flags"]}},"/api/v1/locations":{"get":{"description":"Lists your organization's locations, in id order, with the location id the equipment list's location_id filter takes.","operationId":"listLocations","parameters":[{"description":"Include retired locations (excluded by default).","example":true,"in":"query","name":"include_retired","required":false,"schema":{"type":"boolean"}},{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1006,"name":"Docs Retired Location","barcode":"LOC-DOCS-1","parent_location_id":null,"retired_at":"2025-01-15T15:00:00Z","created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"},{"id":1007,"name":"Docs Lab","barcode":"LOC-DOCS-2","parent_location_id":null,"retired_at":null,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":2,"total_pages":1}},"schema":{"$ref":"#/components/schemas/LocationList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List locations","tags":["Locations"]}},"/api/v1/locations/{id}":{"get":{"description":"Returns one location by its id. It is not filtered by retired, so a retired location's id still resolves.","operationId":"getLocation","parameters":[{"description":"The location's id, as GET /api/v1/locations returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1008,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":1008,"name":"Docs Lab","barcode":"LOC-DOCS-3","parent_location_id":null,"retired_at":null,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}},"schema":{"$ref":"#/components/schemas/LocationRecord"}}},"description":"The record."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Get one location","tags":["Locations"]}},"/api/v1/manufacturers":{"get":{"description":"Lists your organization's equipment manufacturers, by id. Needs the makes_and_models:read scope. At most 50 per page. Available to assistant keys only; any other token receives 404 not_found. Names are returned as people wrote them, after invisible characters are removed and values longer than 200 characters are shortened; meta.untrusted_fields lists the fields that hold such text.","operationId":"listManufacturers","parameters":[{"description":"true or false. Include retired manufacturers (excluded by default).","example":true,"in":"query","name":"include_retired","required":false,"schema":{"type":"boolean"}},{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1006,"name":"Docs Manufacturer","retired_at":null,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1,"untrusted_fields":["name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/ManufacturerList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List manufacturers","tags":["Lookups"]}},"/api/v1/models":{"get":{"description":"Lists your organization's equipment models, by id, each with its manufacturer. Needs the makes_and_models:read scope. At most 50 per page. Available to assistant keys only; any other token receives 404 not_found. Names are returned as people wrote them, after invisible characters are removed and values longer than 200 characters are shortened; meta.untrusted_fields lists the fields that hold such text.","operationId":"listModels","parameters":[{"description":"true or false. Include retired models (excluded by default).","example":true,"in":"query","name":"include_retired","required":false,"schema":{"type":"boolean"}},{"description":"Manufacturer id, exact match. An id that is not one of your organization's manufacturers matches no model.","example":1007,"in":"query","name":"manufacturer_id","required":false,"schema":{"type":"integer"}},{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1006,"name":"Docs Model","manufacturer":{"id":1007,"name":"Docs Manufacturer"},"retired_at":null,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1,"untrusted_fields":["manufacturer.name","name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/ModelList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List models","tags":["Lookups"]}},"/api/v1/reports":{"get":{"description":"Lists your organization's saved reports, oldest first. report_type is one of: category, location, maintenance, compliance, warranty, equipment_amperages; it is null for a report whose type is not set. columns are the columns GET /api/v1/reports/{report_id}/results returns for the report, in its order, drawn only from: barcode, asset_number, serial_number, category, location, department, manufacturer, model, status, next_service_date, next_calibration_due, certification_expiry, warranty_expiry, date_acquired, amperage. Who created a report, its recipients and its schedule are not included. 50 at most per page. Available to assistant keys only; any other token receives 404 not_found. Report names are returned as people wrote them, after invisible characters are removed and values longer than 200 characters are shortened; meta.untrusted_fields lists the fields that hold such text.","operationId":"listReports","parameters":[{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1001,"name":"Docs maintenance report","report_type":"maintenance","columns":["barcode","status","next_service_date"],"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1,"untrusted_fields":["name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/ReportList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List saved reports","tags":["Saved reports"]}},"/api/v1/reports/{report_id}/results":{"get":{"description":"Lists the rows one saved report returns when it is run, the same assets the report's Run page shows: one row per asset, where id is the asset's id and values holds one entry per column, keyed by column name in the report's column order. meta.columns lists those columns, drawn only from: barcode, asset_number, serial_number, category, location, department, manufacturer, model, status, next_service_date, next_calibration_due, certification_expiry, warranty_expiry, date_acquired, amperage. A date is YYYY-MM-DD, any other value is a string, and an unset value is null. Category and location reports are ordered by that name, then by asset id; every other report by asset id. A report whose type is not set returns no rows. Another organization's report id receives the same 404 as an id no report has. 50 at most per page. Available to assistant keys only; any other token receives 404 not_found. Values other than dates are returned as people wrote them, after invisible characters are removed and values longer than 200 characters are shortened; meta.untrusted_fields lists the fields that hold such text.","operationId":"listReportResults","parameters":[{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"The saved report's id, as GET /api/v1/reports returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1002,"in":"path","name":"report_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1025,"values":{"barcode":"EQ-1042","status":"Active","next_service_date":"2026-01-01"}}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1,"columns":["barcode","status","next_service_date"],"untrusted_fields":["values.barcode","values.status"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/ReportRowList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List a saved report's results","tags":["Saved reports"]}},"/api/v1/search":{"get":{"description":"Searches your organization's equipment, service appointments, calibration records, vendors and locations for the words in q. People are never searched. Each type is searched only when the key holds that type's scope (equipment:read for equipment and calibration records, appointments:read, vendors:read, locations:read) and its user may view that type; the request itself needs equipment:read. A result is kept only when every word of q appears in a returned field of that record, so results can be fewer than the search index holds: a word found only in a field this API does not return, such as a vendor's contact details, an asset's private notes or a location's description, does not find it. Each record is that type's standard representation, the fields its own read returns to personal and integration tokens: a service appointment has no outcome fields and a vendor has no contact, whatever the key's scopes. Results are listed by type, in the order equipment, service_appointment, calibration_record, vendor, location, at most 20 of each type and 50 per page. Available to assistant keys only; any other token receives 404 not_found. Answers 403 feature_disabled when search is not turned on for your organization, and 400 parameter_missing without q. Text is returned as people wrote it, after invisible characters are removed and values longer than 200 characters (2,000 for notes) are shortened; meta.untrusted_fields lists the fields that hold such text.","operationId":"searchRecords","parameters":[{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"The words to search for, up to 200 characters. Required.","example":"Docs example","in":"query","name":"q","required":true,"schema":{"type":"string"}},{"description":"Only results of this type: one of equipment, service_appointment, calibration_record, vendor, location.","example":"equipment","in":"query","name":"type","required":false,"schema":{"enum":["equipment","service_appointment","calibration_record","vendor","location"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"type":"equipment","id":1026,"record":{"id":1026,"barcode":"EQ-1042","serial_number":"SN-1042","asset_number":null,"finance_asset_number":null,"nickname":"Docs example asset","status":{"id":1007,"name":"Active"},"manufacturer":{"id":1008,"name":"Docs Manufacturer 6"},"model":{"id":1007,"name":"Docs Model 6"},"category":{"id":1007,"name":"Docs Category 6"},"subcategory":null,"department":{"id":1008,"name":"Docs Department"},"location":{"id":1009,"name":"Docs Lab"},"assigned_user":null,"assigned_to_name":null,"parent_id":null,"is_reference_standard":false,"gxp":false,"date_acquired":null,"warranty_expiry":null,"end_of_support_date":null,"eol_date":null,"last_service_date":null,"next_service_date":"2026-01-01","service_interval_days":null,"next_calibration_due":"2026-01-10","calibration_interval_days":null,"no_longer_calibratable":false,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}},{"type":"service_appointment","id":1003,"record":{"id":1003,"appointment_type":"preventive","start_date":"2026-01-10T15:00:00Z","end_date":"2026-01-10T17:00:00Z","cost":"150.00","notes":"Docs example appointment","equipment":{"id":1026,"barcode":"EQ-1042","name":"Docs example asset"},"vendor":{"id":1001,"name":"Docs Vendor Co"},"posted_by":{"type":"integration","id":1004,"name":"Jira integration"},"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}}],"meta":{"page":1,"per_page":25,"total_count":2,"total_pages":1,"untrusted_fields":["record.barcode","record.category.name","record.department.name","record.equipment.barcode","record.equipment.name","record.location.name","record.manufacturer.name","record.model.name","record.nickname","record.notes","record.posted_by.name","record.serial_number","record.status.name","record.vendor.name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/SearchResultList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Search records","tags":["Search"]}},"/api/v1/service_appointments":{"get":{"description":"Lists booked service appointments, most recent start date first. For assistant keys each appointment also carries outcome (completed, failed or null) and outcome_note.","operationId":"listServiceAppointments","parameters":[{"description":"Only appointments for this equipment id.","example":1027,"in":"query","name":"equipment_id","required":false,"schema":{"type":"integer"}},{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"Only appointments starting at or after this instant. Dates and times without an offset are read in your organization's time zone (Pacific today) for assistant keys, and as UTC for other tokens; a value with Z or an offset is used as given.","example":"2026-01-01T00:00:00Z","in":"query","name":"start_from","required":false,"schema":{"type":"string"}},{"description":"Only appointments starting at or before this instant (a date-only value covers the whole day). Dates and times without an offset are read in your organization's time zone (Pacific today) for assistant keys, and as UTC for other tokens; a value with Z or an offset is used as given.","example":"2026-01-31T00:00:00Z","in":"query","name":"start_to","required":false,"schema":{"type":"string"}},{"description":"Only appointments updated at or after this instant. Dates and times without an offset are read in your organization's time zone (Pacific today) for assistant keys, and as UTC for other tokens; a value with Z or an offset is used as given.","example":"2026-01-01T00:00:00Z","in":"query","name":"updated_since","required":false,"schema":{"type":"string"}},{"description":"Only appointments with this vendor id.","example":1002,"in":"query","name":"vendor_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1004,"appointment_type":"preventive","start_date":"2026-01-10T15:00:00Z","end_date":"2026-01-10T17:00:00Z","cost":"150.00","notes":"Docs example appointment","equipment":{"id":1027,"barcode":"EQ-1042","name":"Docs example asset"},"vendor":{"id":1002,"name":"Docs Vendor Co"},"posted_by":{"type":"integration","id":1005,"name":"Jira integration"},"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1}},"schema":{"$ref":"#/components/schemas/ServiceAppointmentList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List service appointments","tags":["Service appointments"]},"post":{"description":"Books a service visit for one asset with one vendor, attributed to the token that sent it. For assistant keys the created appointment also carries outcome and outcome_note (both null). For assistant keys an Idempotency-Key header is required, a body field not listed here is refused with 422 unknown_field, a disposed asset is refused with 422, and dry_run=true checks the request and returns the appointment it would book, with id null, without booking it.","operationId":"createServiceAppointment","parameters":[{"description":"Required for assistant keys, whose write without it answers 400 idempotency_key_required. Optional for other tokens, whose write without it runs once. 1 to 255 printable ASCII characters naming this write. A retry with the same key and the same body, within 24 hours, returns the response stored for the first request, with the header Idempotent-Replayed: true, and writes nothing again. The same key with a different body answers 422 idempotency_key_reused; a retry while the first request is still running answers 409 idempotency_conflict; a malformed key answers 400 invalid_idempotency_key. A key belongs to the token that sent it and spans every operation. A dry run (dry_run=true) neither stores nor replays a response for its key.","example":"LAB-100-booking","in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string"}},{"description":"true checks the request and returns the result it would have, and changes nothing. Assistant keys only.","example":true,"in":"query","name":"dry_run","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"example":{"equipment_id":1028,"vendor_id":1003,"start_date":"2026-01-20T09:00:00-06:00","end_date":"2026-01-20T11:00:00-06:00","appointment_type":"preventive","cost":"150.00","notes":"Preventive maintenance -- HVAC filter replacement."},"schema":{"description":"The body fields this write accepts. For assistant keys a field not listed here is refused with 422 unknown_field; for other tokens it is ignored.","properties":{"appointment_type":{"description":"One of: preventive, corrective. Absent or null leaves the appointment unclassified.","enum":["preventive","corrective"],"example":"preventive","nullable":true,"type":"string"},"cost":{"description":"A number with up to 2 decimal places, sent as a string, e.g. \"150.00\". Absent or null records no cost.","example":"150.00","nullable":true,"type":"string"},"end_date":{"description":"A full ISO-8601 timestamp with an explicit UTC offset: when the visit ends. It may not be before start_date.","example":"2026-01-20T11:00:00-06:00","format":"date-time","type":"string"},"equipment_id":{"description":"The positive integer id of a live asset of your organization that has not been disposed of, as GET /api/v1/equipment returns it.","example":1028,"type":"integer"},"notes":{"description":"Up to 10,000 characters of text with no NUL character: the appointment's notes. Absent or null records none.","example":"Preventive maintenance -- HVAC filter replacement.","maxLength":10000,"nullable":true,"type":"string"},"start_date":{"description":"A full ISO-8601 timestamp with an explicit UTC offset: when the visit starts. A bare date is read as midnight Pacific.","example":"2026-01-20T09:00:00-06:00","format":"date-time","type":"string"},"vendor_id":{"description":"The positive integer id of an active vendor of your organization, as GET /api/v1/vendors returns it.","example":1003,"type":"integer"}},"required":["equipment_id","vendor_id","start_date","end_date"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":null,"appointment_type":"preventive","start_date":"2026-01-20T15:00:00Z","end_date":"2026-01-20T17:00:00Z","cost":"150.00","notes":"Preventive maintenance -- HVAC filter replacement.","outcome":null,"outcome_note":null,"equipment":{"id":1029,"barcode":"EQ-1042","name":"Docs example asset"},"vendor":{"id":1004,"name":"Docs Vendor Co"},"posted_by":{"type":"user","id":1020,"name":"Docs Assistant"},"created_at":null,"updated_at":null},"meta":{"dry_run":true,"untrusted_fields":["equipment.barcode","equipment.name","notes","posted_by.name","vendor.name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/ServiceAppointmentRecord"}}},"description":"Nothing was created: the answer to a dry run (meta.dry_run true, id null), or the reason meta.outcome names."},"201":{"content":{"application/json":{"example":{"data":{"id":1005,"cost":"150.00","notes":"Preventive maintenance -- HVAC filter replacement.","vendor":{"id":1003,"name":"Docs Vendor Co"},"end_date":"2026-01-20T17:00:00Z","equipment":{"id":1028,"name":"Docs example asset","barcode":"EQ-1042"},"posted_by":{"id":1006,"name":"Jira integration","type":"integration"},"created_at":"2026-01-15T15:00:00Z","start_date":"2026-01-20T15:00:00Z","updated_at":"2026-01-15T15:00:00Z","appointment_type":"preventive"}},"schema":{"$ref":"#/components/schemas/ServiceAppointmentRecord"}}},"description":"The record was created. A replay of the same Idempotency-Key returns the stored response."},"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"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Book a service appointment","tags":["Service appointments"]}},"/api/v1/service_appointments/{id}":{"get":{"description":"Returns one service appointment by its id. For assistant keys it also carries outcome (completed, failed or null) and outcome_note.","operationId":"getServiceAppointment","parameters":[{"description":"The service appointment's id, as GET /api/v1/service_appointments returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1006,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":1006,"appointment_type":"preventive","start_date":"2026-01-10T15:00:00Z","end_date":"2026-01-10T17:00:00Z","cost":"150.00","notes":"Docs example appointment","equipment":{"id":1030,"barcode":"EQ-1042","name":"Docs example asset"},"vendor":{"id":1005,"name":"Docs Vendor Co"},"posted_by":{"type":"integration","id":1007,"name":"Jira integration"},"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}},"schema":{"$ref":"#/components/schemas/ServiceAppointmentRecord"}}},"description":"The record."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Get one service appointment","tags":["Service appointments"]},"patch":{"description":"Moves or changes one service appointment of your organization, as editing it in LabDesk does: only the fields sent change, and null clears an optional field. When the visit falls within a service contract for its asset and vendor, the contract must have a visit left, except for a change of the outcome or the outcome note alone, which never counts against it. One audit entry records each changed field, and the text of the notes is never copied into it. The answer is the appointment after the change. Available to assistant keys only; any other token receives 404 not_found. An Idempotency-Key header is required: a retry with the same key and body returns the first answer instead of changing the appointment again. With dry_run=true the request is checked and the answer it would give is returned with meta.dry_run true, and nothing is changed. A body field not listed here is refused with 422 unknown_field.","operationId":"updateServiceAppointment","parameters":[{"description":"Required: a write without it answers 400 idempotency_key_required. 1 to 255 printable ASCII characters naming this write. A retry with the same key and the same body, within 24 hours, returns the response stored for the first request, with the header Idempotent-Replayed: true, and writes nothing again. The same key with a different body answers 422 idempotency_key_reused; a retry while the first request is still running answers 409 idempotency_conflict; a malformed key answers 400 invalid_idempotency_key. A key belongs to the token that sent it and spans every operation. A dry run (dry_run=true) neither stores nor replays a response for its key.","example":"LAB-150-move","in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string"}},{"description":"true checks the request and returns the result it would have, and changes nothing. Assistant keys only.","example":true,"in":"query","name":"dry_run","required":false,"schema":{"type":"boolean"}},{"description":"The service appointment's id, as GET /api/v1/service_appointments returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1007,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"start_date":"2026-01-12T07:00:00-08:00","end_date":"2026-01-12T09:30:00-08:00","vendor_id":1006,"notes":"The vendor came on the 12th; moved from the 10th.","appointment_type":"preventive","cost":"175.00","outcome":"completed","outcome_note":"Passed the airflow check."},"schema":{"additionalProperties":false,"description":"The body fields this write accepts. A field not listed here is refused with 422 unknown_field.","properties":{"appointment_type":{"description":"One of: preventive, corrective. Null leaves the appointment unclassified.","enum":["preventive","corrective"],"example":"preventive","nullable":true,"type":"string"},"cost":{"description":"A number of zero or more with up to 2 decimal places, sent as a string, e.g. \"175.00\". Null clears the cost.","example":"175.00","nullable":true,"type":"string"},"end_date":{"description":"An ISO-8601 date-time, read as start_date is. It must not be before start_date (the stored one when start_date is not sent). It may not be null.","example":"2026-01-12T09:30:00-08:00","format":"date-time","type":"string"},"notes":{"description":"A string of up to 10,000 characters with no NUL character. Null clears the notes.","example":"The vendor came on the 12th; moved from the 10th.","maxLength":10000,"nullable":true,"type":"string"},"outcome":{"description":"\"completed\" or \"failed\": whether the visit passed. Null clears it (not recorded).","enum":["completed","failed"],"example":"completed","nullable":true,"type":"string"},"outcome_note":{"description":"A string of up to 1000 characters explaining the outcome. Null clears it.","example":"Passed the airflow check.","maxLength":1000,"nullable":true,"type":"string"},"start_date":{"description":"An ISO-8601 date-time; one without an offset is read in your organization's time zone, and a bare date is midnight Pacific. It may not be null.","example":"2026-01-12T07:00:00-08:00","format":"date-time","type":"string"},"vendor_id":{"description":"Positive integer id of an active vendor in your organization. It may not be null.","example":1006,"type":"integer"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":1007,"appointment_type":"preventive","start_date":"2026-01-12T15:00:00Z","end_date":"2026-01-12T17:30:00Z","cost":"175.00","notes":"The vendor came on the 12th; moved from the 10th.","outcome":"completed","outcome_note":"Passed the airflow check.","equipment":{"id":1031,"barcode":"EQ-1042","name":"Docs example asset"},"vendor":{"id":1006,"name":"Docs Vendor Co"},"posted_by":{"type":"integration","id":1008,"name":"Jira integration"},"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"},"meta":{"untrusted_fields":["equipment.barcode","equipment.name","notes","outcome_note","posted_by.name","vendor.name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/ServiceAppointmentRecord"}}},"description":"The record after the write, or as the write would leave it when meta.dry_run is true."},"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"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Change a service appointment","tags":["Service appointments"]}},"/api/v1/service_contracts":{"get":{"description":"Lists your organization's service contracts, in id order. Read-only: the API has no write operation for service contracts.","operationId":"listServiceContracts","parameters":[{"description":"true for a contract covering today (both its start and expiration bound); false otherwise.","example":true,"in":"query","name":"active","required":false,"schema":{"type":"boolean"}},{"description":"Only contracts for this equipment id.","example":1032,"in":"query","name":"equipment_id","required":false,"schema":{"type":"integer"}},{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"Only contracts with this vendor id.","example":1007,"in":"query","name":"vendor_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1001,"equipment":{"id":1032,"barcode":"EQ-1042","name":"Docs example asset"},"vendor":{"id":1007,"name":"Docs Vendor Co"},"start_date":"2025-01-01","expiration_date":"2026-12-31","number_of_service_appointments":10,"number_of_days_between_appointments":null,"active":true,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1}},"schema":{"$ref":"#/components/schemas/ServiceContractList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List service contracts","tags":["Service contracts"]}},"/api/v1/service_contracts/{id}":{"get":{"description":"Returns one service contract by its id. It is not filtered by active, so an expired or not-yet-started contract still resolves.","operationId":"getServiceContract","parameters":[{"description":"The service contract's id, as GET /api/v1/service_contracts returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1002,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":1002,"equipment":{"id":1033,"barcode":"EQ-1042","name":"Docs example asset"},"vendor":{"id":1008,"name":"Docs Vendor Co"},"start_date":"2025-01-01","expiration_date":"2026-12-31","number_of_service_appointments":10,"number_of_days_between_appointments":null,"active":true,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}},"schema":{"$ref":"#/components/schemas/ServiceContractRecord"}}},"description":"The record."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Get one service contract","tags":["Service contracts"]}},"/api/v1/users":{"get":{"description":"Lists the active people of your organization by id and name, ordered by last name, then first name, 50 at most per page. Only the id and the name are returned: no email address, phone number, job title or other detail about a person. LabDesk staff and deactivated people are not listed. Available to assistant keys only; any other token receives 404 not_found. Names are returned as people wrote them, after invisible characters are removed and values longer than 200 characters are shortened; meta.untrusted_fields lists the fields that hold such text.","operationId":"listUsers","parameters":[{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1021,"name":"Docs Assistant"},{"id":1022,"name":"Docs Lab Manager"},{"id":1023,"name":"Docs Technician"},{"id":1024,"name":"Test User"},{"id":1025,"name":"Test User"}],"meta":{"page":1,"per_page":25,"total_count":5,"total_pages":1,"untrusted_fields":["name"],"untrusted_note":"Text at these fields was written by people or vendors, not by LabDesk.","truncated_fields":[]}},"schema":{"$ref":"#/components/schemas/PersonList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List people","tags":["People"]}},"/api/v1/vendors":{"get":{"description":"Lists your organization's vendors, in id order, with the vendor id a booking takes. For assistant keys holding contacts:read each vendor also carries a contact object (name, email, phone).","operationId":"listVendors","parameters":[{"description":"Include retired vendors (excluded by default).","example":true,"in":"query","name":"include_retired","required":false,"schema":{"type":"boolean"}},{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1009,"name":"Docs Retired Vendor","retired_at":"2025-01-15T15:00:00Z","created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"},{"id":1010,"name":"Docs Vendor Co","retired_at":null,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":2,"total_pages":1}},"schema":{"$ref":"#/components/schemas/VendorList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List vendors","tags":["Vendors"]}},"/api/v1/vendors/{id}":{"get":{"description":"Returns one vendor by its id. It is not filtered by retired, so a retired vendor's id still resolves. For assistant keys holding contacts:read it also carries a contact object (name, email, phone).","operationId":"getVendor","parameters":[{"description":"The vendor's id, as GET /api/v1/vendors returns it. An id of another organization answers 404 not_found, the same as an id no record has.","example":1011,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":1011,"name":"Docs Vendor Co","retired_at":null,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}},"schema":{"$ref":"#/components/schemas/VendorRecord"}}},"description":"The record."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Get one vendor","tags":["Vendors"]}},"/api/v1/webhook_subscriptions":{"get":{"description":"Lists the webhook subscriptions registered with the token making the request, active and disabled. Every webhook endpoint works on the calling integration token's own subscriptions only: another token's -- even in your organization -- is not listed and answers 404 not_found. Your organization's administrators see and manage all of them under Account -> Webhooks. A disabled subscription carries disabled_reason: failures (too many deliveries in a row failed), token_revoked or token_expired (the integration token that registered it stopped working). The signing secret is never returned, and only the host of the URL is shown.","operationId":"listWebhookSubscriptions","parameters":[{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1001,"url_host":"hooks.example.com","event_types":["equipment.service_overdue","equipment.calibration_overdue"],"status":"active","disabled_reason":null,"disabled_at":null,"consecutive_failures":0,"active_since":"2026-01-15T15:00:00Z","last_success_at":null,"last_failure_at":null,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1}},"schema":{"$ref":"#/components/schemas/WebhookSubscriptionList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List webhooks","tags":["Webhook subscriptions"]},"post":{"description":"Registers a URL to receive signed event deliveries. Needs an integration token -- a personal API token is refused. The signing secret is returned once, in this response only; an integration keeps it to verify each delivery's signature. A replay with the same Idempotency-Key returns the same subscription with \"secret\": null, so an integration that lost its secret deletes the subscription and registers again. An organization's registrations are checked one at a time: a second one sent while the first is still being checked answers 429 registration_in_progress with a Retry-After header.","operationId":"createWebhookSubscription","parameters":[{"description":"Required for assistant keys, whose write without it answers 400 idempotency_key_required. Optional for other tokens, whose write without it runs once. 1 to 255 printable ASCII characters naming this write. A retry with the same key and the same body, within 24 hours, returns the response stored for the first request, with the header Idempotent-Replayed: true, and writes nothing again. The same key with a different body answers 422 idempotency_key_reused; a retry while the first request is still running answers 409 idempotency_conflict; a malformed key answers 400 invalid_idempotency_key. A key belongs to the token that sent it and spans every operation. A dry run (dry_run=true) neither stores nor replays a response for its key.","example":"LAB-100-webhook","in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"url":"https://hooks.example.com/labdesk","event_types":["equipment.service_overdue","service_appointment.created"]},"schema":{"description":"The body fields this write accepts. A field not listed here is ignored.","properties":{"event_types":{"description":"A non-empty list of distinct event type names, no wildcards. Each one of: service_appointment.created, service_appointment.updated, equipment.service_due_soon, equipment.service_overdue, equipment.calibration_due_soon, equipment.calibration_overdue, calibration_record.created, document.attached.","example":["equipment.service_overdue","service_appointment.created"],"items":{"enum":["service_appointment.created","service_appointment.updated","equipment.service_due_soon","equipment.service_overdue","equipment.calibration_due_soon","equipment.calibration_overdue","calibration_record.created","document.attached"],"type":"string"},"type":"array"},"url":{"description":"An https URL on port 443, with no user name or password, that resolves only to public internet addresses (checked at registration and again before every delivery). Up to 2,048 characters.","example":"https://hooks.example.com/labdesk","maxLength":2048,"type":"string"}},"required":["url","event_types"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"example":{"data":{"id":1002,"secret":"whsec_EXAMPLE","status":"active","url_host":"hooks.example.com","created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z","disabled_at":null,"event_types":["equipment.service_overdue","service_appointment.created"],"active_since":"2026-01-15T15:00:00Z","disabled_reason":null,"last_failure_at":null,"last_success_at":null,"consecutive_failures":0}},"schema":{"$ref":"#/components/schemas/WebhookSubscriptionCreatedRecord"}}},"description":"The record was created. A replay of the same Idempotency-Key returns the stored response."},"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"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Register a webhook","tags":["Webhook subscriptions"]}},"/api/v1/webhook_subscriptions/{id}":{"delete":{"description":"Deletes a webhook subscription registered with the token making the request, together with its delivery log; nothing more is sent to its URL. Another token's subscription answers 404. Answers 204 No Content, with an empty body.","operationId":"deleteWebhookSubscription","parameters":[{"description":"The webhook subscription's id, as GET /api/v1/webhook_subscriptions returns it. A subscription registered with another token answers 404 not_found.","example":1003,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"The record was deleted. The response has no body."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Delete a webhook","tags":["Webhook subscriptions"]},"get":{"description":"Returns one webhook subscription registered with the token making the request, by its id; any other id answers 404 not_found. The signing secret is never returned.","operationId":"getWebhookSubscription","parameters":[{"description":"The webhook subscription's id, as GET /api/v1/webhook_subscriptions returns it. A subscription registered with another token answers 404 not_found.","example":1004,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"id":1004,"url_host":"hooks.example.com","event_types":["equipment.service_overdue","equipment.calibration_overdue"],"status":"active","disabled_reason":null,"disabled_at":null,"consecutive_failures":0,"active_since":"2026-01-15T15:00:00Z","last_success_at":null,"last_failure_at":null,"created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}},"schema":{"$ref":"#/components/schemas/WebhookSubscriptionRecord"}}},"description":"The record."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"Get one webhook","tags":["Webhook subscriptions"]}},"/api/v1/webhook_subscriptions/{webhook_subscription_id}/deliveries":{"get":{"description":"Lists the delivery log of one webhook subscription registered with the token making the request, newest first. Deliveries are kept for 30 days. status is one of: pending, succeeded, failed, abandoned. event_id is the id your receiver saw in the delivery. next_attempt_at is the earliest time the next attempt may start: deliveries go out one at a time across every organization -- the organization with the fewest deliveries waiting first, and each organization's oldest first -- so an attempt starts later while others are sent: another organization's burst delays yours by at most one attempt (15 seconds), while a backlog of your own is sent one delivery at a time. A delivery is abandoned when LabDesk drops it unsent: its subscription was disabled, or the API was switched off for your organization when its attempt came due (last_error then reads public_api_disabled). The payload itself is not included.","operationId":"listWebhookDeliveries","parameters":[{"description":"The page to return, counting from 1; default 1. A page past the last one returns an empty data array. A value that is not a positive whole number answers 422 invalid_parameter.","example":1,"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Records per page: 1-100, default 25, and at most 50 for assistant keys. A larger value is reduced to that maximum, and meta.per_page reports the value used. A value that is not a positive whole number answers 422 invalid_parameter.","example":25,"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"The webhook subscription's id, as GET /api/v1/webhook_subscriptions returns it. A subscription registered with another token answers 404 not_found.","example":1005,"in":"path","name":"webhook_subscription_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":1001,"event_id":"evt_7d3f0a52-1c2b-4e5f-9a6b-0c1d2e3f4a5b","event_type":"equipment.service_overdue","status":"succeeded","attempts":1,"last_response_status":200,"last_error":null,"next_attempt_at":null,"delivered_at":"2026-01-15T15:00:00Z","created_at":"2026-01-15T15:00:00Z","updated_at":"2026-01-15T15:00:00Z"}],"meta":{"page":1,"per_page":25,"total_count":1,"total_pages":1}},"schema":{"$ref":"#/components/schemas/WebhookDeliveryList"}}},"description":"A page of records. meta holds page, per_page, total_count and total_pages."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"BearerAuth":[]}],"summary":"List a webhook's deliveries","tags":["Webhook subscriptions"]}}},"servers":[{"url":"https://labdeskinc.com","description":"This LabDesk site"}]}