Inspectorio LAB TEST API
The LAB TEST API from Inspectorio — 8 operation(s) for lab test.
The LAB TEST API from Inspectorio — 8 operation(s) for lab test.
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: "<details>\n <summary><strong>Lab Test Creation Modes</strong></summary>\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</details>\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-tes
# --- truncated at 32 KB (121 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/inspectorio/refs/heads/main/openapi/inspectorio-lab-test-api-openapi.yml