openapi: 3.0.3 info: title: File Management ANALYTICS LAB TEST API version: v3 servers: - description: Production Environment url: https://files-integration.inspectorio.com - description: Pre-Production Environment url: https://files-integration.pre.inspectorio.com tags: - name: LAB TEST paths: /api/v1/lab-tests: get: operationId: ListLabTest summary: List Lab Tests description: List Lab Tests parameters: - description: offset in: query name: offset required: false schema: type: integer minimum: 0 default: 0 - description: limit in: query name: limit required: false schema: type: integer - description: search by Lab Test ID or Case Number or Report Number, each value separated by comma in: query name: id required: false schema: type: string example: LT04FW38M0,LT0EP02S71 - description: status of lab test, each value separated by comma in: query name: status required: false schema: type: string example: confirmed,new - description: lab test updatedAt From, in format YYYY-MM-DDTHH:MM:SSZ in: query name: updatedFrom required: false schema: type: string example: '2024-01-01T00:00:00Z' - description: lab test updatedAt To, in format YYYY-MM-DDTHH:MM:SSZ in: query name: updatedTo required: false schema: type: string example: '2024-01-01T00:00:00Z' - description: lab test createdAt From, in format YYYY-MM-DDTHH:MM:SSZ in: query name: createdFrom required: false schema: type: string example: '2024-01-01T00:00:00Z' - description: lab test createdAt To, in format YYYY-MM-DDTHH:MM:SSZ in: query name: createdTo required: false schema: type: string example: '2024-01-01T00:00:00Z' - description: lab test disposition status in: query name: dispositionStatus required: false schema: type: string example: pending-review - description: lab test dispositionLastUpdateTimeFrom, in format YYYY-MM-DDTHH:MM:SSZ in: query name: dispositionLastUpdateTimeFrom required: false schema: type: string format: date-time example: '2024-01-01T00:00:00Z' - description: lab test dispositionLastUpdateTimeTo, in format YYYY-MM-DDTHH:MM:SSZ in: query name: dispositionLastUpdateTimeTo required: false schema: type: string format: date-time example: '2024-01-01T00:00:00Z' tags: - LAB TEST security: - ApiKeyAuth: [] responses: '200': description: List Lab Tests content: application/json: schema: $ref: '#/components/schemas/LabTestListResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '401': description: Unauthorized content: text/plain: schema: type: string example: auth or apikey header(s) not exists post: operationId: CreateLabTest summary: Create Lab Test description: "
\n Lab Test Creation Modes\n\n Create a new Lab Test. The system supports three creation modes based on provided data:\n\n **Submitted Test Creation:**\n - Provide all required test result fields: sampleReceiptDate, reportIssueDate, reportNumber, testProperties, and overallResult\n - Creates a lab test with \"submitted\" status\n - All provided data is saved\n\n **New Test Creation:**\n - Omit test result fields but provide all required fields specified in the Lab Test Form\n - Creates a lab test with \"new\" status\n - The following data is discarded: sampleReceiptDate, reportIssueDate, reportNumber, originalReportNumber, revisionNumber, testProperties, overallResult, testPackages, and testReport type attachments\n - Non-report attachments are preserved\n\n **Draft Test Creation:**\n - Omit test result fields AND one or more required fields from the Lab Test Form\n - Creates a lab test with \"draft\" status\n - The following data is discarded: sampleReceiptDate, reportIssueDate, reportNumber, originalReportNumber, revisionNumber, testProperties, overallResult, testPackages, and testReport type attachments\n - Non-report attachments are preserved\n\n
\n" tags: - LAB TEST requestBody: content: application/json: schema: $ref: '#/components/schemas/LabTest' required: true security: - ApiKeyAuth: [] responses: '201': description: Lab Test Created Successfully content: application/json: schema: $ref: '#/components/schemas/LabTestCreateResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '401': description: Unauthorized content: text/plain: schema: type: string example: auth or apikey header(s) not exists /api/v1/lab-tests/efiling: post: operationId: CPSCEfiling summary: Get CPSC eFiling Data description: "**Preconditions**\n- The lab test must be in `Completed` status.\n- The lab test entity type must be `Style` or `Item`.\n- If the lab test entity type is `Style`, `filingLevel` must be `style`.\n- The authenticated organization must have an active CPSC template configured\n for the requested `method`.\n\n**Filing Methods**\n| Value | Description |\n|-------|-------------|\n| `cpsc_product_registry` | CPSC Product Registry submission |\n| `reference_pga_message_set` | Reference PGA Message Set submission |\n| `full_pga_message_set` | Full PGA Message Set submission |\n\n**Filing Levels**\n| Value | Description |\n|-------|-------------|\n| `style` | One payload entry per style (default) |\n| `item` | One payload entry per item |\n\n**Response Schema Variability**\n\nFor `full_pga_message_set` and `reference_pga_message_set`, the response payload\nstructure is **not fixed** - it is generated dynamically from the template configured\nfor the organization under **Rules & Regulations**. The schema, field set, ordering,\nand nesting all derive from that configuration, so the actual response may differ from\nthe examples below. The examples illustrate the *typical* shape of each method's output;\ntreat the response body as a free-form object with provider-defined keys.\n\nFor `cpsc_product_registry`, the response follows the fixed schema defined by\nCPSC Product Registry requirements.\n" tags: - LAB TEST requestBody: required: true content: application/json: schema: type: object required: - labTestIds - method properties: labTestIds: type: array description: 'List of Lab Test IDs (10-letter UID or UUID). ' minItems: 1 items: type: string example: - LT0UQVESE1 - LT0NFRA760 - LT0WMF4GP0 - 79396db9-f685-4ba6-97b4-0fbd124296c3 method: type: string description: The eFiling method to use. enum: - cpsc_product_registry - reference_pga_message_set - full_pga_message_set example: full_pga_message_set filingLevel: type: string description: 'The granularity of the eFiling payload. Defaults to `style`. Cannot be `item` when the lab test entity type is `Style`. ' enum: - style - item default: style example: style security: - ApiKeyAuth: [] responses: '200': description: eFiling payload exported successfully content: application/json: schema: type: object additionalProperties: true examples: cpsc_product_registry: summary: Response for cpsc_product_registry method description: 'Output schema follows the CPSC Product Registry requirements. The fields below reflect the fixed CPSC-defined structure. ' value: data: productList: - coreProduct: versionId: '1' primaryProductId: TB-12IN-BRN primaryProductIdType: Alternate ID identifiers: - identType: GTIN identifier: 00012345678905 - identType: UPC identifier: 012345678905 - identType: SKU identifier: SKU-TB-12 - identType: 'Model #' identifier: MDL-TB-12 - identType: 'Serial #' identifier: SN-TB-0001 - identType: 'Registered #' identifier: REG-TB-001 certificateType: CPC name: Sample Plush Teddy Bear tradeBrandName: Sample Brand A description: Plush stuffed teddy bear toy, 12 inches color: Brown style: Style 1 manufacturer: gln: 0860000000017 alternateId: SAMPLE-MFG-001 sbmId: SBM0001 name: Sample Manufacturing Co addressLine1: 88 Sample Industrial Road addressLine2: Building 7 aptNumber: '201' city: Shanghai stateProvince: SH country: CN postalCode: '200001' phone: +86-21-5555-0100 email: sample-manufacturer@example.com manufactureDate: 03/2024 productionStartDate: 03/01/2024 productionEndDate: 03/20/2024 lotNumber: SAMPLE-LOT-001 lotNumberAssignedBy: Manufacturer lastTestDate: 03/15/2024 labs: - type: ITL cpscId: '1000' name: Sample Testing Lab addressLine1: 1500 Sample Lab Avenue addressLine2: West Wing aptNumber: '300' city: Los Angeles stateProvince: CA country: US postalCode: '90017' phone: +1-213-555-0100 email: sample-lab@example.com citationCodes: - '4.27' - '1303' - '1501' testReportId: SAMPLE-REPORT-001 testURL: https://reports.example.com/SAMPLE-REPORT-001 testReportAccessKey: SAMPLE-ACCESS-KEY-001 isComponent: 'No' exemptions: - 1500.91(d)(7) poc: type: Importer directives: productUpdate: N manufacturer: isNew: Y gln: 0860000000017 alternateId: SAMPLE-MFG-001 labs: - isNew: N gln: 0860000000024 alternateId: SAMPLE-LAB-001 poc: isNew: Y gln: 0860000000031 alternateId: SAMPLE-POC-001 - coreProduct: versionId: '2' primaryProductId: TSHIRT-STRIPE-6 primaryProductIdType: Alternate ID identifiers: - identType: GTIN identifier: 00012345678912 - identType: UPC identifier: 012345678912 - identType: SKU identifier: SKU-TS-6 - identType: 'Model #' identifier: MDL-TS-6 - identType: 'Serial #' identifier: SN-TS-0002 - identType: 'Registered #' identifier: REG-TS-002 certificateType: CPC name: Sample Kids Striped T-Shirt tradeBrandName: Sample Brand B description: Children's short-sleeve cotton T-shirt, boys size 6 color: Blue style: Style 2 manufacturer: gln: 0860000000048 alternateId: SAMPLE-MFG-002 sbmId: SBM0002 name: Sample Manufacturing Co addressLine1: 45 Sample Factory Street addressLine2: District 1 aptNumber: Floor 5 city: Ho Chi Minh City stateProvince: SG country: VN postalCode: '700000' phone: +84-28-3822-0100 email: sample-manufacturer@example.com manufactureDate: 02/2024 productionStartDate: 02/10/2024 productionEndDate: 02/25/2024 lotNumber: SAMPLE-LOT-002 lotNumberAssignedBy: Manufacturer lastTestDate: 02/28/2024 labs: - type: ITL cpscId: '1000' name: Sample Testing Lab addressLine1: 2200 Sample Lab Avenue addressLine2: West Wing aptNumber: '1400' city: Dallas stateProvince: TX country: US postalCode: '75201' phone: +1-214-555-0100 email: sample-lab@example.com citationCodes: - '1610' testReportId: SAMPLE-REPORT-002 testURL: https://reports.example.com/SAMPLE-REPORT-002 testReportAccessKey: SAMPLE-ACCESS-KEY-002 isComponent: 'No' exemptions: - 1610.1(d)(2) poc: type: Importer directives: productUpdate: Y versionIdToUpdate: '1' manufacturer: isNew: N gln: 0860000000048 alternateId: SAMPLE-MFG-002 labs: - isNew: N gln: 0860000000024 alternateId: SAMPLE-LAB-001 poc: isNew: N gln: 0860000000055 alternateId: SAMPLE-POC-002 code: 200 status: 200 reference_pga_message_set: summary: Response for reference_pga_message_set method (all values UPPERCASE) value: data: - data: oi: oiCommercialDescription: PLUSH STUFFED BEAR TOY, 12 INCH pg01: pg01PgaLineNumber: '001' pg01GovernmentAgencyCode: CPS pg01GovernmentAgencyProgramCode: CPS pg01GovernmentAgencyProcessingCode: REF pg01IntendedUseCode: '130.003' pg02: pg02ItemType: P pg02ProductCodeQualifier: PRI pg02ProductCodeNumber: TB-12IN-BRN pg02VersionCodeQualifier: PRIV pg02VersionCodeNumber: '1' pg14: pg14CertifierId: SAMPLE-CERTIFIER-001 - data: oi: oiCommercialDescription: BOYS COTTON STRIPED T-SHIRT, SIZE 6 pg01: pg01PgaLineNumber: '002' pg01GovernmentAgencyCode: CPS pg01GovernmentAgencyProgramCode: CPS pg01GovernmentAgencyProcessingCode: REF pg01IntendedUseCode: '130.003' pg02: pg02ItemType: P pg02ProductCodeQualifier: PRI pg02ProductCodeNumber: TSHIRT-STRIPE-6 pg02VersionCodeQualifier: PRIV pg02VersionCodeNumber: '2' pg14: pg14CertifierId: SAMPLE-CERTIFIER-002 length: 2 code: 200 status: 200 full_pga_message_set: summary: Response for full_pga_message_set method (all values UPPERCASE) value: data: - data: oi: oiCommercialDescription: PLUSH STUFFED BEAR TOY, 12 INCH pg01: pg01PgaLineNumber: '001' pg01GovernmentAgencyCode: CPS pg01GovernmentAgencyProgramCode: CPS pg01GovernmentAgencyProcessingCode: FCP pg01ProductGlobalIdQualifier: SRV pg01ProductGlobalIdCode: 00012345678905 pg01IntendedUseCode: '130.003' pg02: pg02ItemType: P pg02ProductCodeQualifier: SKU pg02ProductCodeNumber: SKU-TB-12 pg07: pg07TradeName: SAMPLE TOY BRAND pg07ProductName: PLUSH BEAR 12IN pg07ManufactureMonthYear: '032024' pg07ItemIdentityQualifier: ALT pg07ItemIdentityNumber: TB-12IN-BRN pg10: pg10CommodityQualifierCodeMC: PC9 pg10CommodityCharacteristicQualifierMC: MC pg10CommodityCharacteristicDescriptionMC: BROWN pg10CommodityQualifierCodeMS: PC9 pg10CommodityCharacteristicQualifierMS: MS pg10CommodityCharacteristicDescriptionMS: STYLE 1 pg10CommodityQualifierCodeMD: PC9 pg10CommodityCharacteristicQualifierMD: MD pg10CommodityCharacteristicDescriptionMD: PLUSH STUFFED BEAR TOY, 12 INCH pg25: pg25LotNumberQualifier: '1' pg25LotNumber: SAMPLE-LOT-001 pg25ProductionStartDate: '03012024' pg25ProductionEndDate: '03202024' pg30: pg30LaboratoryTestingStatus: L pg30LabTestDate: '03152024' pg19_20_21: pg19_20_21_mf: pg19EntityRoleCodeMF: MF pg19EntityIdentificationCodeMF: SBM pg19SbmRegistryIdMF: SBM0001 pg19EntityNameMF: SAMPLE MANUFACTURING CO pg19EntityAddress1MF: 88 SAMPLE IND ROAD pg20EntityAddress2MF: BUILDING 7 pg20EntityApartmentNumberSuiteNumberMF: '201' pg20EntityCityMF: SHANGHAI pg20EntityStateProvinceMF: SH pg20EntityCountryMF: CN pg20EntityZipPostalCodeMF: '200001' pg21EntityPhoneMF: +86-21-555-0100 pg21EntityEmailMF: SAMPLE-MANUFACTURER@EXAMPLE.COM pg19_20_21_itl: pg19EntityRoleCodeITL: ITL pg19CpscLabIdITL: '1000' pg60AdditionalInfoQualifierCITITL: CIT pg60CitationCodeITL: - '4.27' - '1303' - '1501' pg60AdditionalInfoQualifierCP1ITL: CP1 pg60AdditionalInfoCP1ITL: SAMPLE-REF-001 pg60AdditionalInfoQualifierCP2ITL: CP2 pg60AdditionalInfoCP2ITL: HTTPS://REPORTS.EXAMPLE.COM/SAMPLE-REF-001 pg60AdditionalInfoQualifierCP3ITL: CP3 pg60AdditionalInfoCP3ITL: SAMPLE-ACCESS-KEY-001 pg60AdditionalInfoQualifierCP4ITL: CP4 pg60AdditionalInfoCP4ITL: PLUSH OUTER FABRIC - POLYESTER pg19_20_21_ce: pg19EntityRoleCodeCE: CE pg19EntityNameCE: SAMPLE IMPORTER CO pg19EntityAddress1CE: 250 SAMPLE PARK AVENUE pg20EntityAddress2CE: FLOOR 12 pg20EntityApartmentNumberSuiteNumberCE: '1200' pg20EntityCityCE: NEW YORK pg20EntityStateProvinceCE: NY pg20EntityCountryCE: US pg20EntityZipPostalCodeCE: '10177' pg21EntityPhoneCE: +1-212-555-0142 pg21EntityEmailCE: SAMPLE-IMPORTER@EXAMPLE.COM pg19_20_21_pk: pg19EntityRoleCodePK: PK pg19EntityNamePK: SAMPLE PACKING CO pg19EntityAddress1PK: 100 SAMPLE PACKER ST pg20EntityAddress2PK: DOCK 5 pg20EntityApartmentNumberSuiteNumberPK: '500' pg20EntityCityPK: NEWARK pg20EntityStateProvincePK: NJ pg20EntityCountryPK: US pg20EntityZipPostalCodePK: '07102' pg21EntityPhonePK: +1-973-555-0199 pg21EntityEmailPK: SAMPLE-PACKER@EXAMPLE.COM pg22: pg22ProductCertificateIndicator: CPY - data: oi: oiCommercialDescription: BOYS COTTON STRIPED T-SHIRT, SIZE 6 pg01: pg01PgaLineNumber: '002' pg01GovernmentAgencyCode: CPS pg01GovernmentAgencyProgramCode: CPS pg01GovernmentAgencyProcessingCode: FCP pg01ProductGlobalIdQualifier: SRV pg01ProductGlobalIdCode: 00012345678912 pg01IntendedUseCode: '130.003' pg02: pg02ItemType: P pg02ProductCodeQualifier: SKU pg02ProductCodeNumber: SKU-TS-6 pg07: pg07TradeName: SAMPLE APPAREL BRAND pg07ProductName: KIDS TSHIRT 6 pg07ManufactureMonthYear: '022024' pg07ItemIdentityQualifier: ALT pg07ItemIdentityNumber: TSHIRT-STRIPE-6 pg10: pg10CommodityQualifierCodeMC: PC9 pg10CommodityCharacteristicQualifierMC: MC pg10CommodityCharacteristicDescriptionMC: BLUE pg10CommodityQualifierCodeMS: PC9 pg10CommodityCharacteristicQualifierMS: MS pg10CommodityCharacteristicDescriptionMS: STYLE 2 pg10CommodityQualifierCodeMD: PC9 pg10CommodityCharacteristicQualifierMD: MD pg10CommodityCharacteristicDescriptionMD: BOYS COTTON STRIPED T-SHIRT, SIZE 6 pg25: pg25LotNumberQualifier: '1' pg25LotNumber: SAMPLE-LOT-002 pg25ProductionStartDate: '02102024' pg25ProductionEndDate: '02252024' pg30: pg30LaboratoryTestingStatus: L pg30LabTestDate: 02282024 pg19_20_21: pg19_20_21_mf: pg19EntityRoleCodeMF: MF pg19EntityIdentificationCodeMF: SBM pg19SbmRegistryIdMF: SBM0002 pg19EntityNameMF: SAMPLE MANUFACTURING CO pg19EntityAddress1MF: 45 SAMPLE FACTORY ST pg20EntityAddress2MF: DISTRICT 1 pg20EntityApartmentNumberSuiteNumberMF: FL 5 pg20EntityCityMF: HO CHI MINH CITY pg20EntityStateProvinceMF: SG pg20EntityCountryMF: VN pg20EntityZipPostalCodeMF: '700000' pg21EntityPhoneMF: +84-28-382-0100 pg21EntityEmailMF: SAMPLE-MANUFACTURER@EXAMPLE.COM pg19_20_21_itl: pg19EntityRoleCodeITL: ITL pg19CpscLabIdITL: '1000' pg60AdditionalInfoQualifierCITITL: CIT pg60CitationCodeITL: - '1610' pg60AdditionalInfoQualifierCP1ITL: CP1 pg60AdditionalInfoCP1ITL: SAMPLE-REF-002 pg60AdditionalInfoQualifierCP2ITL: CP2 pg60AdditionalInfoCP2ITL: HTTPS://REPORTS.EXAMPLE.COM/SAMPLE-REF-002 pg60AdditionalInfoQualifierCP3ITL: CP3 pg60AdditionalInfoCP3ITL: SAMPLE-ACCESS-KEY-002 pg60AdditionalInfoQualifierCP4ITL: CP4 pg60AdditionalInfoCP4ITL: MAIN FABRIC - WOVEN COTTON pg19_20_21_ce: pg19EntityRoleCodeCE: CE pg19EntityNameCE: SAMPLE IMPORTER CO pg19EntityAddress1CE: 250 SAMPLE PARK AVENUE pg20EntityAddress2CE: FLOOR 12 pg20EntityApartmentNumberSuiteNumberCE: '1200' pg20EntityCityCE: NEW YORK pg20EntityStateProvinceCE: NY pg20EntityCountryCE: US pg20EntityZipPostalCodeCE: '10177' pg21EntityPhoneCE: +1-212-555-0142 pg21EntityEmailCE: SAMPLE-IMPORTER@EXAMPLE.COM pg19_20_21_pk: pg19EntityRoleCodePK: PK pg19EntityNamePK: SAMPLE PACKING CO pg19EntityAddress1PK: 100 SAMPLE PACKER ST pg20EntityAddress2PK: DOCK 5 pg20EntityApartmentNumberSuiteNumberPK: '500' pg20EntityCityPK: NEWARK pg20EntityStateProvincePK: NJ pg20EntityCountryPK: US pg20EntityZipPostalCodePK: '07102' pg21EntityPhonePK: +1-973-555-0199 pg21EntityEmailPK: SAMPLE-PACKER@EXAMPLE.COM pg22: pg22ProductCertificateIndicator: CPY length: 2 code: 200 status: 200 '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '401': description: Unauthorized content: text/plain: schema: type: string example: auth or apikey header(s) not exists /api/v1/lab-tests/bulk-actions/{action}: post: operationId: BulkActionLabTest summary: Bulk Action Lab Test description: Start/Reject/Abort/Comment Lab Test in batch tags: - LAB TEST parameters: - description: action in: path name: action required: true schema: type: string enum: - LT_START - LT_REJECT - LT_ABORT - LT_COMMENT requestBody: content: application/json: schema: type: object properties: data: type: array items: oneOf: - $ref: '#/components/schemas/LabTestBulkActionStartRequestItem' - $ref: '#/components/schemas/LabTestBulkActionRejectAbortRequestItem' - $ref: '#/components/schemas/LabTestBulkActionCommentRequestItem' required: - data required: true security: - ApiKeyAuth: [] responses: '204': description: Lab Test Bulk Action successfully content: application/json: schema: $ref: '#/components/schemas/LabTestUpdateResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '401': description: Unauthorized content: text/plain: schema: type: string example: auth or apikey header(s) not exists /api/v1/lab-tests/test-packages/{package_id}: get: operationId: GetLabTestPackageDetail summary: Get Lab Test Package Detail description: Get Lab Test Package Detail tags: - LAB TEST parameters: - description: Package ID in: path name: package_id required: true schema: type: string - description: Data Provider ID in: query name: dataProvider required: false schema: type: string responses: '200': description: Get Lab Test Package Detail content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/LabTestPackageDetailResponse' '400': description: Bad Request content: application/json: schema: type: object properties: detail: type: string example: Org {data_provider} not found. code: type: integer example: 400 status: type: integer example: 400 '401': description: Unauthorized content: text/plain: schema: type: string example: auth or apikey header(s) not exists '404': description: Lab Test Package Not Found content: application/json: schema: type: object properties: detail: type: string example: Not found. code: type: integer example: 404 status: type: integer example: 404 put: operationId: UpdateLabTestPackage summary: Update Lab Test Package description: Update a lab test package tags: - LAB TEST parameters: - description: Package ID in: path name: package_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/LabTestPackageUpdateRequest' responses: '204': description: Lab test package updated successfully '400': description: Bad Request content: application/json: schema: type: object properties: detail: type: string example: Invalid data provider '401': description: Unauthorized content: text/plain: schema: type: string example: auth or apikey header(s) not exists /api/v1/lab-tests/test-packages: get: operationId: GetLabTestPackageList summary: List Lab Test Packages description: Get a paginated list of lab test packages with filtering options tags: - LAB TEST parameters: - description: Search by package ID or name in: query name: search required: false schema: type: string - description: Filter by lab test types in: query name: labTestTypes required: false schema: type: string example: ?labTestTypes=Type 1&labTestTypes=Type 2 - description: Filter by revisions in: query name: revisions required: false schema: type: string example: ?revisions=Rev 1&revisions=Rev 2 - description: Filter by enabled status in: query name: enabled required: false schema: type: boolean - description: Filter by creation date from (inclusive) in: query name: createdFrom required: false schema: type: string format: date-time example: '2024-09-01T00:00:00Z' - description: Filter by creation date to (inclusive) in: query name: createdTo required: false schema: type: string format: date-time example: '2024-09-01T00:00:00Z' - description: Filter by last update date from (inclusive) in: query name: updatedFrom required: false schema: type: string format: date-time example: '2024-09-01T00:00:00Z' - description: Filter by last update date to (inclusive) in: query name: updatedTo required: false schema: type: string format: date-time example: '2024-09-01T00:00:00Z' - description: Number of items to return in: query name: limit required: false schema: type: integer minimum: 1 maximum: 100 default: 10 - description: Number of items to skip in: query name: offset required: false schema: type: integer minimum: 0 default: 0 - description: Data Provider ID in: query name: dataProvider required: false schema: type: string responses: '200': description: Successfully retrieved lab test package list content: application/json: schema: type: object properties: total: type: integer description: Total number of items matching the filter criteria example: 1 limit: type: integer description: Number of items per page example: 10 offset: type: integer description: Number of items skipped example: 0 data: $ref: '#/components/schemas/LabTestPackageListResponse' '400': description: Bad Request content: application/json: schema: type: object properties: detail: type: string example: Invalid data provider '401': description: Unauthorized content: text/plain: schema: type: string example: auth or apikey header(s) not exists post: operationId: CreateLabTestPackage summary: Create Lab Test Package description: Create a new lab test package tags: - LAB TEST requestBody: content: application/json: schema: $ref: '#/components/schemas/LabTestPackageCreateRequest' responses: '201': description: Lab test package created successfully content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/LabTestPackageDetailResponse' '400': description: Bad Request content: application/json: schema: type: object properties: detail: type: string example: Invalid data provider '401': description: Unauthorized content: text/plain: schema: type: string example: auth or apikey header(s) not exists /api/v1/lab-tests/test-properties/{property_id}: get: operationId: GetLabTestPropertyDetail summary: Get Lab Test Property Detail description: Get Lab Test Property Detail tags: - LAB TEST parameters: - description: Property ID in: path name: property_id required: true schema: type: string - description: Data Provider ID in: query name: dataProvider required: false schema: type: string responses: '200': description: Get Lab Test Property Detail content: application/json: schema: $ref: '#/components/schemas/LabTestPropertyDetail' '400': description: Bad Request content: application/json: schema: type: object properties: detail: type: string example: Org {data_provider} not found. code: type: integer example: 400 status: type: integer example: 400 '401': description: Unauthorized content: text/plain: schema: type: string example: auth or apikey header(s) not exists '404': description: Lab Test Property Not Found content: application/json: schema: type: object properties: detail: type: string example: Not found. code: type: integer example: 404 status: type: integer example: 404 put: operationId: UpdateLabTestProperty summary: Update Lab Test Property description: Update Lab Test Property tags: - LAB TEST parameters: - description: Property ID in: path name: property_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/LabTestPropertyUpdateRequest' required: true responses: '204': content: application/json: schema: {} description: No Content '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '401': description: Unauthorized content: text/plain: schema: type: string example: auth or apikey header(s) not exists '404': description: Lab Test Property Not Found content: application/json: schema: type: object properties: detail: type: string example: Not found. code: type: integer example: 404 status: type: integer example: 404 /api/v1/lab-tests/test-properties: get: operationId: GetLabTestPropertyList summary: List Lab Test Properties description: Get a paginated list of lab test properties with filtering options tags: - LAB TEST parameters: - description: Search by property ID or name or standard/method in: query name: search required: false schema: type: string - description: Filter by standards in: query name: standards required: false schema: type: string example: ?standards=Standard%201&standards=Standard%202 - description: Filter by revisions in: query name: revisions required: false schema: type: string example: ?revisions=Rev%201&revisions=Rev%202 - description: Filter by revision years in: query name: revisionYears required: false schema: type: string example: ?revisionYears=2024&revisionYears=2025 - description: Filter by lab test sub category custom id in: query name: testSubcategories required: false schema: type: string example: ?testSubcategories=1234567890&testSubCategories=1234567891 - description: Filter by lab test category custom id in: query name: testCategories required: false schema: type: string example: ?testCategories=1234567890&testCategories=1234567891 - description: Filter by lab test types full name in: query name: labTestTypes required: false schema: type: string example: ?labTestTypes=Type%201&labTestTypes=Type%202 - description: Filter by enabled status in: query name: enabled required: false schema: type: boolean - description: Filter by validity duration in: query name: validityDurations required: false schema: type: string example: ?validityDurations=10&validityDurations=20 - description: Filter by creation date from (inclusive) in: query name: createdFrom required: false schema: type: string format: date-time example: '2024-09-01T00:00:00Z' - description: Filter by creation date to (inclusive) in: query name: createdTo required: false schema: type: string format: date-time example: '2024-09-01T00:00:00Z' - description: Filter by last update date from (inclusive) in: query name: updatedFrom required: false schema: type: string format: date-time example: '2024-09-01T00:00:00Z' - description: Filter by last update date to (inclusive) in: query name: updatedTo required: false schema: type: string format: date-time example: '2024-09-01T00:00:00Z' - description: Number of items to return in: query name: limit required: false schema: type: integer minimum: 1 maximum: 100 default: 10 - description: Number of items to skip in: query name: offset required: false schema: type: integer minimum: 0 default: 0 - description: Data Provider ID in: query name: dataProvider required: false schema: type: string responses: '200': description: Successfully retrieved lab test properties list content: application/json: schema: type: object properties: total: type: integer description: Total number of items matching the filter criteria example: 1 limit: type: integer description: Number of items per page example: 10 offset: type: integer description: Number of items skipped example: 0 data: type: array items: $ref: '#/components/schemas/LabTestPropertyDetail' '400': description: Bad Request content: application/json: schema: type: object properties: detail: type: string example: Invalid data provider '401': description: Unauthorized content: text/plain: schema: type: string example: auth or apikey header(s) not exists post: operationId: CreateLabTestProperty summary: Create Lab Test Property description: Create Lab Test Property tags: - LAB TEST requestBody: content: application/json: schema: $ref: '#/components/schemas/LabTestPropertyCreateRequest' required: true responses: '201': description: Lab Test Property Created Successfully content: application/json: schema: type: object properties: data: type: object properties: id: type: string description: Property ID example: Test Property API code: type: integer description: Response status code example: 201 status: type: integer description: Response status example: 201 '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '401': description: Unauthorized content: text/plain: schema: type: string example: auth or apikey header(s) not exists /api/v1/lab-tests/{id}: put: operationId: UploadUpdatePreCreatedLabTest summary: Upload/Update Pre-Created Lab Test description: Upload/Update Pre-Created Lab Test tags: - LAB TEST parameters: - description: Lab test uuid or Lab test id in: path name: id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/LabTestUploadRequestBody' required: true security: - ApiKeyAuth: [] responses: '204': description: Upload/Update Pre-Created Lab Test '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '401': description: Unauthorized content: text/plain: schema: type: string example: auth or apikey header(s) not exists get: operationId: GetLabTestDetail summary: Get Lab Test Detail description: Get Lab Test Detail tags: - LAB TEST parameters: - description: Lab test uuid or Lab test id in: path name: id required: true schema: type: string responses: '200': description: Get Lab Test Detail content: application/json: schema: $ref: '#/components/schemas/LabTestDetailResponse' '401': description: Unauthorized content: text/plain: schema: type: string example: auth or apikey header(s) not exists components: schemas: LabTestCondition: type: object properties: id: type: string nullable: true name: type: string nullable: true result: nullable: true $ref: '#/components/schemas/ResultEnum' samples: type: array nullable: true items: $ref: '#/components/schemas/LabTestSample' followUpAction: nullable: true $ref: '#/components/schemas/LabTestFollowUpAction' BaseLabTestDetailResponseInfix: type: object properties: questionnaire: type: object properties: forTestCreation: $ref: '#/components/schemas/QuestionnaireObject' forTestExecution: $ref: '#/components/schemas/QuestionnaireObject' attachments: type: object properties: generalInformation: $ref: '#/components/schemas/AttachmentObject' testResult: $ref: '#/components/schemas/AttachmentObject' questionnaire: $ref: '#/components/schemas/AttachmentObject' activity: $ref: '#/components/schemas/AttachmentObject' followUpAction: $ref: '#/components/schemas/AttachmentObject' sampleReceiptDate: type: string format: date description: Sample receipt date example: '2024-01-10' reportIssueDate: type: string format: date description: Report issue date example: '2024-01-15' reportNumber: type: string description: Report number example: RPT-2024-001 originalReportNumber: type: string description: Original report number example: RPT-2024-001 revisionNumber: type: integer description: Revision number example: 0 testPackages: type: array description: Test packages items: type: object properties: id: type: string description: Test package id example: TP-2024-001 name: type: string description: Test package name example: Chemical Test Package type: type: string nullable: true description: Test package type LabTest: description: 'Lab Test Serializer **Entity Type Constraint**: Only one entity type (items, materials, or styles) should be provided per request. ' allOf: - $ref: '#/components/schemas/LabTestBase' - oneOf: - title: Item type: object properties: items: type: array items: $ref: '#/components/schemas/LabTestItem' description: Array of items for the lab test required: - items additionalProperties: false - title: Material type: object properties: materials: type: array items: $ref: '#/components/schemas/LabTestCreateMaterial' description: Array of materials for the lab test required: - materials additionalProperties: false - title: Style type: object properties: styles: type: array items: $ref: '#/components/schemas/LabTestCreateStyle' description: Array of styles for the lab test required: - styles additionalProperties: false LabTestListResponseItemObject: type: object properties: itemIds: type: array description: Array of item ids items: type: string maxLength: 255 styleIds: type: array description: Array of style ids items: type: string maxLength: 255 productLines: type: array description: Array of product lines items: type: string maxLength: 255 productCategories: type: array description: Array of product categories items: type: string maxLength: 255 brands: type: array description: Array of brands items: type: string maxLength: 255 LabTestUpdateResponse: type: object properties: caseNumber: type: string description: Lab test case number uuid: type: string description: Lab test uuid example: b04ed17c-0253-40a1-bc3c-5df138643057 code: type: integer description: Response status code example: 204 status: type: integer description: Response status code example: 204 LabTestListForItem: title: Item allOf: - $ref: '#/components/schemas/LabTestList' - type: object properties: items: $ref: '#/components/schemas/LabTestListResponseItemObject' CustomOrg: type: object properties: localOrganizationId: type: string nullable: true maxLength: 255 name: type: string nullable: true default: '' maxLength: 255 address: type: string nullable: true default: '' maxLength: 255 city: type: string nullable: true default: '' maxLength: 255 country: type: string nullable: true default: '' maxLength: 255 postal: type: string nullable: true default: '' maxLength: 255 province: type: string nullable: true default: '' maxLength: 255 contacts: type: array items: $ref: '#/components/schemas/schemas-Contact' nullable: true tier: type: integer maximum: 3 minimum: 1 nullable: true LabTestCustomOrgWithTier: type: object properties: name: type: string description: Org name address: type: string description: Address city: type: string description: City country: type: string description: Country province: type: string description: Province postal: type: string description: Postal contacts: type: array items: $ref: '#/components/schemas/LabTestCustomOrgContact' localOrganizationId: type: string description: Local org id localOrganizationName: type: string description: Local org name tier: type: string description: Org tier BaseLabTestDetailResponsePostfix: type: object properties: overallResult: type: object properties: result: $ref: '#/components/schemas/ResultEnum' example: pass reviewResult: type: string nullable: true example: pass disposition: $ref: '#/components/schemas/LabTestDisposition' linkedTests: type: array description: Lab tests linked to this lab test (retest or manual link) items: $ref: '#/components/schemas/LinkedTestDetailItem' createdAt: type: string description: created time example: '2024-07-16T08:13:25Z' updatedAt: type: string description: updated time example: '2024-07-16T08:13:25Z' LabTestBase: type: object description: Base Lab Test properties properties: clientId: type: string nullable: true maxLength: 255 applicantId: type: string nullable: true maxLength: 255 testType: type: string maxLength: 255 testForm: type: string maxLength: 255 purchaseOrders: type: array items: type: string maxLength: 255 nullable: true testServices: type: array items: type: string nullable: true expectedCompletionDate: type: string format: date nullable: true productionDate: type: string format: date nullable: true billingInformation: type: object allOf: - $ref: '#/components/schemas/CustomOrg' nullable: true labTestAgency: type: object allOf: - $ref: '#/components/schemas/CustomOrg' nullable: true retailerBrand: type: object allOf: - $ref: '#/components/schemas/CustomOrg' nullable: true factories: type: array items: $ref: '#/components/schemas/CustomOrg' nullable: true suppliers: type: array items: $ref: '#/components/schemas/CustomOrg' nullable: true remarks: type: array items: type: string maxLength: 255 nullable: true stageOfTesting: type: array items: type: string maxLength: 255 nullable: true sampleReceiptDate: type: string format: date nullable: true description: Date when sample was received (required for creating a completed lab test) reportIssueDate: type: string format: date nullable: true description: Date when report was issued (required for creating a completed lab test) reportNumber: type: string nullable: true description: Report number (required for creating a completed lab test) originalReportNumber: type: string nullable: true description: Original report number (required for creating a completed lab test) revisionNumber: type: integer minimum: 0 nullable: true default: 0 description: Revision number (required for creating a completed lab test) testPackages: type: array items: $ref: '#/components/schemas/LabTestPackage' nullable: true description: Test packages testProperties: type: array items: oneOf: - $ref: '#/components/schemas/LabTestPropertyItems' - $ref: '#/components/schemas/LabTestPropertyMaterials' - $ref: '#/components/schemas/LabTestPropertyStyles' nullable: true description: Test properties (required for creating a completed lab test) overallResult: $ref: '#/components/schemas/LabTestOverallResult' nullable: true attachments: type: array items: $ref: '#/components/schemas/LabTestAttachment' nullable: true description: Attached files for Test Report (type "testReport") or General Lab Test Information (type "others"). required: - testForm - testType LabTestFollowUpAttachment: type: object properties: fileId: type: string format: uuid label: type: string nullable: true required: - fileId LabTestTierOrg: type: object properties: name: type: string maxLength: 255 localOrganizationId: type: string maxLength: 255 tier: type: integer maximum: 3 minimum: 1 example: 1 default: 1 nullable: true CategoryBaseObject: type: object properties: id: type: string description: Category ID name: type: string description: Category name required: - id - name LabTestStatusEnum: enum: - new - draft - confirmed - in-progress - submitted - completed - submitted-pending-approval - aborted - rejected - canceled type: string description: '* `new` - New * `draft` - Draft * `confirmed` - Confirmed * `in-progress` - In Progress * `submitted` - Submitted * `completed` - Completed * `submitted-pending-approval` - Submitted Pending Approval * `aborted` - Aborted * `rejected` - Rejected * `canceled` - Canceled' LabTestDetailStyle: allOf: - type: object properties: styleId: type: string description: Style id styleName: type: string description: Style name styleDescription: type: string description: Style description productLine: type: object properties: productLineId: type: string description: Style's product line custom id name: type: string description: Style's product line name productCategory: type: object properties: productCategoryId: type: string description: Style's product category custom id name: type: string description: Style's product category name group: type: object properties: groupId: type: string description: Style's group custom id name: type: string description: Style's group name division: type: object properties: divisionId: type: string description: Style's division custom id name: type: string description: Style's division name department: type: object properties: departmentId: type: string description: Style's department custom id name: type: string description: Style's department name class: type: object properties: classId: type: string description: Style's class custom id name: type: string description: Style's class name brand: type: object properties: brandId: type: string description: Style's brand custom id name: type: string description: Style's brand name - $ref: '#/components/schemas/BaseLabTestDetailEntity' SelectedOrgObject: type: object properties: name: type: string description: Selected org name required: - name LabTestList: type: object properties: uuid: type: string description: Lab test uuid format: uuid labTestId: type: string example: LT0DQFRX19 caseNumber: type: string description: Lab test case number reportNumber: type: string status: $ref: '#/components/schemas/LabTestStatusEnum' testType: type: string description: Type of lab test creator: type: string description: Creator of the lab test receiver: type: string description: Receiver of the lab test executor: type: string description: Executor of the lab test brandRetailer: type: array description: Array of brand retailer information items: $ref: '#/components/schemas/LabTestOrgWithoutTier' suppliers: type: array description: Array of supplier information items: $ref: '#/components/schemas/LabTestTierOrg' factories: type: array description: Array of factory information items: $ref: '#/components/schemas/LabTestTierOrg' labAgency: type: object properties: name: type: string maxLength: 255 localOrganizationId: type: string maxLength: 255 createdAt: type: string format: date-time example: '2024-01-05T15:44:42' updatedAt: type: string format: date-time example: '2024-01-09T12:58:30Z' productType: type: string description: Product type enum: - Item - Style - Material overallResult: type: object properties: result: $ref: '#/components/schemas/ResultEnum' example: pass reviewResult: type: string nullable: true example: pass disposition: $ref: '#/components/schemas/LabTestDisposition' tags: type: array description: Array of tags items: type: string maxLength: 255 linkedTests: type: array description: Lab tests linked to this lab test (retest or manual link) items: $ref: '#/components/schemas/LinkedTestListItem' LabTestPropertyBase: type: object properties: id: type: string name: type: string testPackageId: type: string nullable: true testCategoryId: type: string nullable: true testSubcategoryId: type: string nullable: true testMethod: type: string nullable: true result: type: string enum: - pass - fail - data - na nullable: true reviewResult: type: string nullable: true maxLength: 255 required: - id - name LabTestPropertyMaterials: title: Material allOf: - $ref: '#/components/schemas/LabTestPropertyBase' - type: object properties: materials: type: array nullable: true items: type: object properties: materialId: type: string nullable: true testConditions: type: array nullable: true items: $ref: '#/components/schemas/LabTestCondition' LabTestDisposition: type: object properties: status: type: string enum: - pending-review - response-requested - response-submitted - completed lastUpdateTime: type: string format: date-time example: '2024-01-05T15:44:42' LabTestUpdateCustomOrgContact: type: object properties: name: maxLength: 255 nullable: true type: string email: maxLength: 255 nullable: true type: string format: email telephoneNumber: maxLength: 80 nullable: true type: string mobileNumber: maxLength: 80 nullable: true type: string LabTestPropertyConditionCreateUpdateObject: allOf: - $ref: '#/components/schemas/LabTestPropertyConditionObject' - type: object properties: position: type: integer description: Condition position required: - position LabTestDetailPropertyItemForStyle: allOf: - type: object properties: styleId: type: string - $ref: '#/components/schemas/BaseLabTestDetailPropertyItemForEntity' LabTestDetailItem: allOf: - type: object properties: itemId: type: string description: Item id itemName: type: string description: Item name itemDescription: type: string description: Item description styleId: type: string description: Item's style id styleName: type: string description: Item's style name color: type: string description: Item color size: type: string description: Item size originCountry: type: array description: Item origin country, iso alpha-2 country code items: type: string productLine: type: object properties: productLineId: type: string description: Item's product line custom id name: type: string description: Item's product line name productCategory: type: object properties: productCategoryId: type: string description: Item's product category custom id name: type: string description: Item's product category name group: type: object properties: groupId: type: string description: Item's group custom id name: type: string description: Item's group name division: type: object properties: divisionId: type: string description: Item's division custom id name: type: string description: Item's division name department: type: object properties: departmentId: type: string description: Item's department custom id name: type: string description: Item's department name class: type: object properties: classId: type: string description: Item's class custom id name: type: string description: Item's class name brand: type: object properties: brandId: type: string description: Item's brand custom id name: type: string description: Item's brand name - $ref: '#/components/schemas/BaseLabTestDetailEntity' LabTestPropertyUpdateRequest: type: object properties: name: type: string description: Property name description: type: string description: Property description enabled: type: boolean description: Property enabled status standard: type: string description: Property standard revision: type: string description: Property revision revisionYear: type: string description: Property revision year validatityDuration: type: string description: Property validatity duration conditions: type: array items: $ref: '#/components/schemas/LabTestPropertyConditionCreateUpdateObject' testCategoryId: type: string description: custom id of category testSubcategoryId: type: string description: custom id of subcategory productLines: type: array items: type: string description: custom id of product lines labTestTypes: type: array items: type: string description: short name of lab test types viewingPermissions: type: string enum: - all_orgs - selected_orgs default: all_orgs selectedOrgs: type: array items: type: string description: this field is required used when viewingPermissions is selected_orgs, it's local org id required: - name - conditions - testCategoryId - testSubcategoryId LabTestBulkActionRejectAbortRequestItem: title: Reject / Abort type: object properties: id: type: string description: Lab test uuid or Lab test id reason: type: string description: Reason for rejection / abortion required: - id - reason LabTestPropertyItems: title: Item allOf: - $ref: '#/components/schemas/LabTestPropertyBase' - type: object properties: items: type: array nullable: true items: type: object properties: itemId: type: string nullable: true testConditions: type: array nullable: true items: $ref: '#/components/schemas/LabTestCondition' ResultEnum: enum: - pass - fail - data - na type: string description: '* `pass` - Pass * `fail` - Fail * `data` - Data * `na` - N/A' QuestionnaireObject: type: array items: type: object properties: integrationKey: type: string type: type: string enum: - string - date - attachment - country - table - linkedTest values: type: array items: type: string ValueRangeObject: type: object properties: rangeResult: type: array items: type: string enum: - pass - fail valueResult: type: array items: $ref: '#/components/schemas/ValueResultObject' unit: type: string description: Unit required: - rangeResult - valueResult - unit LabTestCreateMaterial: type: object properties: materialId: type: string maxLength: 255 materialName: type: string nullable: true maxLength: 255 materialDescription: type: string nullable: true maxLength: 255 casNumber: type: string nullable: true maxLength: 255 materialColor: type: string nullable: true maxLength: 255 materialOriginCountry: type: array items: type: string pattern: ^[A-Z]{2}$ description: Alpha-2 country code nullable: true materialSize: type: string nullable: true maxLength: 255 required: - materialId LabTestDetailResponse: type: object properties: data: oneOf: - $ref: '#/components/schemas/LabTestDetailResponseForItem' - $ref: '#/components/schemas/LabTestDetailResponseForStyle' - $ref: '#/components/schemas/LabTestDetailResponseForMaterial' LabTestCustomOrg: type: object properties: name: type: string description: Org name address: type: string description: Address city: type: string description: City country: type: string description: Country province: type: string description: Province postal: type: string description: Postal contacts: type: array items: $ref: '#/components/schemas/LabTestCustomOrgContact' LabTestDetailPropertyItemForMaterial: allOf: - type: object properties: materialId: type: string - $ref: '#/components/schemas/BaseLabTestDetailPropertyItemForEntity' LabTestItem: type: object properties: itemId: type: string maxLength: 255 itemName: type: string maxLength: 255 nullable: true itemDescription: type: string maxLength: 255 nullable: true styleId: type: string maxLength: 255 styleName: type: string maxLength: 255 nullable: true color: type: string nullable: true default: '' maxLength: 255 size: type: string maxLength: 255 nullable: true originCountry: type: array items: type: string pattern: ^[A-Z]{2}$ description: Alpha-2 country code nullable: true sampleSize: type: integer nullable: true unit: type: string nullable: true default: '' maxLength: 255 required: - itemId - styleId LabTestListResponseMaterialObject: type: object properties: materialIds: type: array description: Array of material ids items: type: string maxLength: 255 materialTypes: type: array description: Array of material types items: type: string maxLength: 255 materialCategories: type: array description: Array of material categories items: type: string maxLength: 255 materialSubCategories: type: array description: Array of material sub categories items: type: string maxLength: 255 LabTestDetailResponseForItem: title: Item allOf: - $ref: '#/components/schemas/BaseLabTestDetailResponsePrefix' - type: object properties: items: type: array items: $ref: '#/components/schemas/LabTestDetailItem' - $ref: '#/components/schemas/BaseLabTestDetailResponseInfix' - type: object properties: testProperties: type: array items: $ref: '#/components/schemas/LabTestDetailPropertyForItem' - $ref: '#/components/schemas/BaseLabTestDetailResponsePostfix' LabTestBulkActionCommentRequestItem: title: Comment type: object properties: id: type: string description: Lab test uuid or Lab test id content: type: string description: Comment required: - id - content LabTestPropertyCreateRequest: type: object properties: id: type: string description: Property ID example: Test Property Id name: type: string description: Property name description: type: string description: Property description enabled: type: boolean description: Property enabled status standard: type: string description: Property standard revision: type: string description: Property revision revisionYear: type: string description: Property revision year validatityDuration: type: string description: Property validatity duration conditions: type: array items: $ref: '#/components/schemas/LabTestPropertyConditionCreateUpdateObject' testCategoryId: type: string description: custom id of category testSubcategoryId: type: string description: custom id of subcategory productLines: type: array items: type: string description: custom id of product lines labTestTypes: type: array items: type: string description: short name of lab test types viewingPermissions: type: string enum: - all_orgs - selected_orgs default: all_orgs selectedOrgs: type: array items: type: string description: this field is required used when viewingPermissions is selected_orgs, it's local org id required: - id - name - conditions - testCategoryId - testSubcategoryId LabTestDetailPropertyForMaterial: allOf: - $ref: '#/components/schemas/BaseLabTestDetailProperty' - type: object properties: materials: type: array items: $ref: '#/components/schemas/LabTestDetailPropertyItemForMaterial' LabTestDetailResponseForStyle: title: Style allOf: - $ref: '#/components/schemas/BaseLabTestDetailResponsePrefix' - type: object properties: styles: type: array items: $ref: '#/components/schemas/LabTestDetailStyle' - $ref: '#/components/schemas/BaseLabTestDetailResponseInfix' - type: object properties: testProperties: type: array items: $ref: '#/components/schemas/LabTestDetailPropertyForStyle' - $ref: '#/components/schemas/BaseLabTestDetailResponsePostfix' LinkedTestListItem: type: object description: A lab test linked to this lab test (retest or manual link), list shape properties: uuid: type: string format: uuid description: Linked lab test uuid caseNumber: type: string description: Linked lab test case number labTestId: type: string description: Linked lab test id example: LT0DQFRX19 reportNumber: type: string nullable: true description: Linked lab test report number(s) revisionNumber: type: integer nullable: true description: Linked lab test revision number originalReportNumber: type: string nullable: true description: Linked lab test original report number status: $ref: '#/components/schemas/LabTestStatusEnum' tags: type: array description: Linked lab test tags items: type: string linkedComment: type: string description: Comment describing the link between the two lab tests LabTestCustomOrgWithLocalOrg: allOf: - $ref: '#/components/schemas/LabTestCustomOrg' - type: object properties: localOrganizationId: type: string description: Local org id localOrganizationName: type: string description: Local org name LabTestDetailPropertyCondition: type: object properties: id: type: string description: Test condition ID example: TC001 name: type: string description: Test condition name example: Color Change result: $ref: '#/components/schemas/ResultEnum' description: Test condition result example: pass samples: type: array items: type: object properties: data: type: string description: Sample data example: Grade 4-5 result: $ref: '#/components/schemas/ResultEnum' example: pass sampleNumbers: type: array items: type: integer description: Sample numbers example: - 1 - 2 - 3 followUpAction: type: object properties: comment: type: string description: Follow-up action comment example: No action required attachments: type: array items: type: object properties: name: type: string description: Attachment name example: test-report.pdf url: type: string description: Attachment URL example: https://example.com/files/test-report.pdf label: type: string description: Attachment label example: Test Report nullable: true failureCategoryId: type: string nullable: true description: Failure category ID example: null failureCategoryName: type: string nullable: true description: Failure category name example: null failureId: type: string nullable: true description: Failure ID example: null failureName: type: string nullable: true description: Failure name example: null failureSeverity: type: string description: Failure severity nullable: true enum: - critical - major - minor example: critical LabTestCustomOrgContact: type: object properties: name: type: string description: Contact name email: type: string description: Contact email telephoneNumber: type: string description: Contact telephone number mobileNumber: type: string description: Contact mobile number LabTestPropertyDetail: type: object properties: id: type: string description: Property custom ID name: type: string description: Property name description: type: string description: Property description enabled: type: boolean description: Property enabled status standard: type: string description: Property standard revision: type: string description: Property revision revisionYear: type: string description: Property revision year validatityDuration: type: string description: Property validatity duration conditions: type: array items: $ref: '#/components/schemas/LabTestPropertyConditionObject' testCategory: $ref: '#/components/schemas/CategoryBaseObject' testSubcategory: $ref: '#/components/schemas/CategoryBaseObject' productLine: $ref: '#/components/schemas/CategoryBaseObject' labTestType: $ref: '#/components/schemas/LabTestTypeObject' createdAt: type: string format: date-time description: Property created at updatedAt: type: string format: date-time description: Property updated at viewingPermissions: type: string enum: - all_orgs - selected_orgs default: all_orgs selectedOrgs: type: array items: $ref: '#/components/schemas/SelectedOrgObject' LabTestTypeObject: type: object properties: shortName: type: string description: Lab test type short name fullName: type: string description: Lab test type long name required: - shortName - fullName LabTestDetailResponseForMaterial: title: Material allOf: - $ref: '#/components/schemas/BaseLabTestDetailResponsePrefix' - type: object properties: materials: type: array items: $ref: '#/components/schemas/LabTestDetailMaterial' - $ref: '#/components/schemas/BaseLabTestDetailResponseInfix' - type: object properties: testProperties: type: array items: $ref: '#/components/schemas/LabTestDetailPropertyForMaterial' - $ref: '#/components/schemas/BaseLabTestDetailResponsePostfix' LabTestListResponse: type: object properties: total: type: integer example: 24 description: Total number of records matching the query limit: type: integer example: 10 description: Number of records returned in a batch offset: type: integer example: 0 description: Offset position data: type: array items: oneOf: - $ref: '#/components/schemas/LabTestListForItem' - $ref: '#/components/schemas/LabTestListForStyle' - $ref: '#/components/schemas/LabTestListForMaterial' LabTestOrgWithoutTier: type: object properties: name: type: string maxLength: 255 localOrganizationId: type: string maxLength: 255 LabTestPackageUpdateRequest: type: object properties: name: type: string description: Package name maxLength: 255 type: type: string description: Package type maxLength: 255 example: Sample Type description: type: string description: Package description maxLength: 5000 revision: type: string description: Package revision maxLength: 80 enabled: type: boolean description: Package enabled status default: true labTestTypes: type: array description: Lab test types items: type: string description: Lab test type custom ID maxLength: 80 labTestProperties: type: array description: Lab test properties items: type: string description: Lab test property custom ID maxLength: 100 productLines: type: array description: Product lines items: type: string description: Product line custom ID maxLength: 128 materialTypes: type: array description: Material types items: type: string description: Material type custom ID maxLength: 128 viewingPermissions: type: string description: Viewing permissions enum: - all_orgs - selected_orgs default: all_orgs selectedOrgs: type: array description: Selected organization custom IDs. Required (non-empty) when `viewingPermissions` is `selected_orgs`; ignored otherwise. example: - Org-Custom-ID-1 items: type: string description: Organization custom ID maxLength: 255 LabTestCreateResponse: type: object properties: caseNumber: type: string description: Lab test case number example: LT-2024-001 uuid: type: string description: Lab test uuid format: uuid example: b04ed17c-0253-40a1-bc3c-5df138643057 labTestId: type: string description: 10-digit encoded lab test ID example: ABC1234567 labTestStatus: $ref: '#/components/schemas/LabTestStatusEnum' message: type: string description: Additional information when a new lab test can be created but without test data / results. nullable: true example: 'Insufficient lab test result data. The following data has been discarded (if any): sampleReceiptDate, reportIssueDate, reportNumber, originalReportNumber, revisionNumber, testPackages, testProperties, overallResult, attachments - testReport' BadRequestResponse: type: object properties: detail: type: string description: Bad request error message code: type: integer description: Response status code example: 400 status: type: integer description: Response status code example: 400 LabTestListForStyle: title: Style allOf: - $ref: '#/components/schemas/LabTestList' - type: object properties: styles: $ref: '#/components/schemas/LabTestListResponseStyleObject' LabTestOverallResult: description: Overall test result (required for creating a completed lab test) type: object properties: result: $ref: '#/components/schemas/ResultEnum' reviewResult: type: string nullable: true maxLength: 255 required: - result LabTestDetailPropertyForStyle: allOf: - $ref: '#/components/schemas/BaseLabTestDetailProperty' - type: object properties: styles: type: array items: $ref: '#/components/schemas/LabTestDetailPropertyItemForStyle' schemas-Contact: type: object properties: name: type: string nullable: true default: '' maxLength: 255 email: type: string nullable: true default: '' maxLength: 255 telephoneNumber: type: string nullable: true default: '' maxLength: 80 mobileNumber: type: string nullable: true default: '' maxLength: 80 LabTestDetailPropertyItemForItem: allOf: - type: object properties: itemId: type: string - $ref: '#/components/schemas/BaseLabTestDetailPropertyItemForEntity' LabTestSample: type: object properties: data: type: string nullable: true result: type: string enum: - pass - fail - data sampleNumbers: type: array items: type: integer required: - result - sampleNumbers LabTestUpdateCustomOrg: type: object properties: localOrganizationId: maxLength: 255 nullable: true type: string address: nullable: true type: string city: maxLength: 255 nullable: true type: string country: maxLength: 2 nullable: true type: string description: iso alpha-2 country code province: maxLength: 255 nullable: true type: string postal: maxLength: 50 nullable: true type: string contacts: type: array items: $ref: '#/components/schemas/LabTestUpdateCustomOrgContact' LabTestFollowUpAction: type: object properties: comment: type: string nullable: true attachments: type: array nullable: true items: $ref: '#/components/schemas/LabTestFollowUpAttachment' failureCategoryId: type: string nullable: true failureCategoryName: type: string nullable: true failureId: type: string nullable: true failureName: type: string nullable: true failureSeverity: type: string nullable: true enum: - critical - major - minor BaseLabTestDetailProperty: type: object properties: id: type: string description: Test property ID example: TP001 name: type: string description: Test property name example: Color Fastness to Washing testPackageId: type: string description: Test package ID example: TPK001 testCategoryId: type: string description: Test category ID example: TC001 testCategoryName: type: string description: Test category name example: Physical Tests testSubcategoryId: type: string description: Test subcategory ID example: TSC001 testSubcategoryName: type: string description: Test subcategory name example: Color Fastness result: $ref: '#/components/schemas/ResultEnum' example: pass reviewResult: type: string nullable: true example: pass ValueResultObject: type: object properties: value: type: string description: Value result: type: string description: Result enum: - pass - fail - data - n/a required: - value - result LabTestPropertyConditionObject: type: object properties: id: type: string description: Condition ID name: type: string description: Condition name required: type: boolean description: is condition required followUpActions: type: object properties: provideComment: type: object properties: data: type: boolean default: false pass: type: boolean default: false fail: type: boolean default: false required: type: boolean default: false uploadAttachment: type: object properties: data: type: boolean default: false pass: type: boolean default: false fail: type: boolean default: false required: type: boolean default: false uploadPictureOrVideo: type: object properties: data: type: boolean default: false pass: type: boolean default: false fail: type: boolean default: false required: type: boolean default: false recordFailureCode: type: object properties: data: type: boolean default: false fail: type: boolean default: false required: type: boolean default: false category: type: array items: type: object properties: id: type: string description: Category ID name: type: string description: Category name inputMethod: type: string description: Condition input method enum: - TEST_DATA - TEST_RESULT customValueGroup: type: object properties: name: type: string description: Custom value group name customValues: type: array items: type: object properties: value: type: string description: Custom value result: type: string description: Custom value result valueRange: $ref: '#/components/schemas/ValueRangeObject' required: - name - required - inputMethod LabTestPackageListResponse: allOf: - $ref: '#/components/schemas/LabTestPackageDetailResponse' - type: object properties: createdAt: type: string description: Created at format: date-time example: '2025-01-24T02:31:59Z' updatedAt: type: string description: Updated at format: date-time example: '2025-01-24T02:31:59Z' LabTestAttachment: type: object properties: fileId: type: string maxLength: 64 type: $ref: '#/components/schemas/TypeEnum' label: type: string nullable: true default: '' maxLength: 255 required: - fileId - type BaseLabTestDetailResponsePrefix: type: object properties: uuid: type: string description: Lab test uuid example: 97187b64-81ef-4dfa-9681-9da71fb43b63 caseNumber: type: string description: Lab test case number labTestId: type: string description: Lab test id example: LT0DQFRX19 testType: type: string description: Lab test type testFormId: type: string description: Test form ID example: TF-2024-001 testFormName: type: string description: Test form name example: Chemical Test Form status: $ref: '#/components/schemas/LabTestStatusEnum' tags: type: array description: Lab test tags items: type: string testServices: type: array description: List of test services items: type: string stageOfTesting: type: array description: Stages of testing items: type: string example: - Initial Production expectedCompletionDate: type: string format: date description: Expected completion date example: '2024-01-15' productionDate: type: string format: date description: Production date example: '2024-01-10' remarks: type: array description: Remarks and comments items: type: string example: - Sample meets all requirements creator: type: string description: Creator org receiver: type: string description: Receiver org executor: type: string description: Executor org brandRetailer: $ref: '#/components/schemas/LabTestCustomOrgWithLocalOrg' suppliers: type: array items: $ref: '#/components/schemas/LabTestCustomOrgWithTier' factories: type: array items: $ref: '#/components/schemas/LabTestCustomOrgWithTier' labAgency: $ref: '#/components/schemas/LabTestCustomOrgWithLocalOrg' billingInformation: $ref: '#/components/schemas/LabTestCustomOrg' purchaseOrders: type: array description: Purchase order numbers items: type: string example: - PO-2024-001 - PO-2024-002 productType: type: string description: Product type enum: - Item - Style - Material BaseLabTestDetailEntity: type: object properties: additionalFields: type: array description: Additional fields items: type: object properties: integrationKey: type: string description: Integration key value: type: array description: Values items: type: string sampleSize: type: integer description: Sample size unit: type: string description: Unit LinkedTestDetailItem: type: object description: A lab test linked to this lab test (retest or manual link), detail shape properties: uuid: type: string format: uuid description: Linked lab test uuid caseNumber: type: string description: Linked lab test case number labTestId: type: string description: Linked lab test id example: LT0DQFRX19 status: $ref: '#/components/schemas/LabTestStatusEnum' overallResult: type: object properties: result: $ref: '#/components/schemas/ResultEnum' example: fail reviewResult: type: string nullable: true example: Conditional Pass reportIssueDate: type: string format: date nullable: true description: Linked lab test report issue date example: '2026-02-01' reportNumber: type: string nullable: true description: Linked lab test report number(s) revisionNumber: type: integer nullable: true description: Linked lab test revision number originalReportNumber: type: string nullable: true description: Linked lab test original report number tags: type: array description: Linked lab test tags items: type: string linkedComment: type: string description: Comment describing the link between the two lab tests LabTestPackage: type: object properties: id: type: string maxLength: 255 name: type: string nullable: true default: '' maxLength: 255 required: - id TypeEnum: enum: - testReport - others type: string description: '* `testReport` - testReport * `others` - others' LabTestCreateStyle: type: object properties: styleId: type: string maxLength: 255 styleName: type: string nullable: true maxLength: 255 styleDescription: type: string nullable: true maxLength: 255 required: - styleId LabTestDetailPropertyForItem: allOf: - $ref: '#/components/schemas/BaseLabTestDetailProperty' - type: object properties: items: type: array items: $ref: '#/components/schemas/LabTestDetailPropertyItemForItem' LabTestPropertyStyles: title: Style allOf: - $ref: '#/components/schemas/LabTestPropertyBase' - type: object properties: styles: type: array nullable: true items: type: object properties: styleId: type: string nullable: true testConditions: type: array nullable: true items: $ref: '#/components/schemas/LabTestCondition' LabTestPackageDetailResponse: type: object properties: id: type: string description: Package ID example: PKG-001 name: type: string description: Package name example: Physical Testing Package type: type: string description: Package type example: Sample Type description: type: string description: Package description example: Standard physical testing package for apparel revision: type: string description: Package revision example: Rev 2.1 enabled: type: boolean description: Package enabled status example: true labTestTypes: type: array description: Lab test types items: type: object properties: shortName: type: string description: Lab test type short name example: PHY fullName: type: string description: Lab test type full name example: Physical Testing productLines: type: array description: Product lines items: type: object properties: id: type: string description: Product line ID example: PL-001 name: type: string description: Product line name example: Apparel materialTypes: type: array description: Material types items: type: object properties: id: type: string description: Material type ID example: MT-001 name: type: string description: Material type name example: Cotton labTestProperties: type: array description: Lab test properties items: type: object properties: id: type: string description: Test property ID example: TP-001 name: type: string description: Test property name example: Color Fastness to Washing standard: type: string description: Test property standard example: ISO 105-C06 revision: type: string description: Test property revision example: A2S revisionYear: type: integer nullable: true description: Test property revision year example: 2021 validityDuration: type: integer nullable: true description: Test property validity duration example: 365 conditions: type: integer description: Number of conditions example: 5 viewingPermissions: type: string description: Viewing permissions enum: - all_orgs - selected_orgs example: selected_orgs nullable: true selectedOrgs: type: array nullable: true description: Selected organizations items: type: object properties: name: type: string description: Organization name example: Acme Testing Labs AttachmentObject: type: array items: type: object properties: name: type: string url: type: string LabTestListForMaterial: title: Material allOf: - $ref: '#/components/schemas/LabTestList' - type: object properties: materials: $ref: '#/components/schemas/LabTestListResponseMaterialObject' LabTestUploadRequestBody: type: object properties: reportNumber: type: string originalReportNumber: type: string revisionNumber: type: integer nullable: true reportIssueDate: type: string format: date example: '2024-04-24' testResultAttachments: type: array items: type: object properties: fileId: type: string format: uuid example: f85774e7-cb3a-4bf3-ab8a-92e22bed41ac label: type: string nullable: true required: - fileId testPackages: type: array nullable: true items: type: object properties: id: type: string name: type: string type: type: string nullable: true required: - id - name testProperties: type: array items: oneOf: - $ref: '#/components/schemas/LabTestPropertyItems' - $ref: '#/components/schemas/LabTestPropertyMaterials' - $ref: '#/components/schemas/LabTestPropertyStyles' overallResult: type: object properties: result: type: string example: pass enum: - pass - fail - data reviewResult: type: string nullable: true required: - result questionnaire: type: object nullable: true properties: forTestExecution: $ref: '#/components/schemas/QuestionnaireIntegrationItem' required: - forTestExecution labAgency: $ref: '#/components/schemas/LabTestUpdateCustomOrg' required: - reportNumber - originalReportNumber - testResultAttachments - testProperties - overallResult - reportIssueDate LabTestDetailMaterial: allOf: - type: object properties: materialId: type: string description: Material id materialName: type: string description: Material name materialDescription: type: string description: Material description color: type: string description: Material color size: type: string description: Material size originCountry: type: array description: Material origin country, iso alpha-2 country code items: type: string casNumber: type: string description: CAS number materialType: type: object properties: materialTypeId: type: string description: Material type id name: type: string description: Material type name materialCategory: type: object properties: materialCategoryId: type: string description: Material category id name: type: string description: Material category name materialSubCategory: type: object properties: materialSubCategoryId: type: string description: Material sub category id name: type: string description: Material sub category name - $ref: '#/components/schemas/BaseLabTestDetailEntity' LabTestListResponseStyleObject: type: object properties: styleIds: type: array description: Array of style ids items: type: string maxLength: 255 productLines: type: array description: Array of product lines items: type: string maxLength: 255 productCategories: type: array description: Array of product categories items: type: string maxLength: 255 brands: type: array description: Array of brands items: type: string maxLength: 255 BaseLabTestDetailPropertyItemForEntity: type: object properties: testConditions: type: array items: $ref: '#/components/schemas/LabTestDetailPropertyCondition' LabTestPackageCreateRequest: allOf: - $ref: '#/components/schemas/LabTestPackageUpdateRequest' - type: object properties: id: type: string description: Package ID maxLength: 50 example: PKG-001 LabTestBulkActionStartRequestItem: title: Start type: object properties: id: type: string description: Lab test uuid or Lab test id sampleReceiptDate: type: string format: date description: Sample receipt date required: - id - sampleReceiptDate QuestionnaireIntegrationItem: type: array items: type: object properties: integrationKey: type: string values: type: array items: type: string required: - integrationKey - values