openapi: 3.1.0 info: title: Clients Client Info Reference Data API version: 0.16.0 description: API endpoints for clients to view their orders, samples, and associated labs. All endpoints are read-only (GET) and accessible only with client API credentials. contact: name: Confident Cannabis API Support url: https://www.confidentcannabis.com servers: - url: https://api.confidentcannabis.com description: Production server security: - ApiKeyAuth: [] tags: - name: Reference Data description: Reference data for sample metadata paths: /v0/clients/sampletypes: get: summary: Get all sample types description: Returns a list of all sample types (hidden from public documentation). operationId: getClientSampleTypes tags: - Reference Data security: - ApiKeyAuth: [] responses: '200': description: Successful response with list of sample types content: application/json: schema: type: object required: - success - sample_types properties: success: type: boolean example: true sample_types: type: array items: type: object '401': description: Authentication failed content: application/json: schema: type: object description: Error response required: - success - error_code - error_message properties: success: type: boolean example: false error_code: type: string example: missing_api_key error_message: type: string example: Missing API key header error_details: type: object additionalProperties: type: array items: type: string '403': description: Access denied content: application/json: schema: type: object description: Error response required: - success - error_code - error_message properties: success: type: boolean example: false error_code: type: string example: permission_denied error_message: type: string example: Access denied error_details: type: object additionalProperties: type: array items: type: string /v0/clients/samplecategories: get: summary: Get all sample categories description: Returns a list of all sample categories (hidden from public documentation). operationId: getClientSampleCategories tags: - Reference Data security: - ApiKeyAuth: [] responses: '200': description: Successful response with list of sample categories content: application/json: schema: type: object required: - success - sample_categories properties: success: type: boolean example: true sample_categories: type: array items: type: object '401': description: Authentication failed content: application/json: schema: type: object description: Error response required: - success - error_code - error_message properties: success: type: boolean example: false error_code: type: string example: missing_api_key error_message: type: string example: Missing API key header error_details: type: object additionalProperties: type: array items: type: string '403': description: Access denied content: application/json: schema: type: object description: Error response required: - success - error_code - error_message properties: success: type: boolean example: false error_code: type: string example: permission_denied error_message: type: string example: Access denied error_details: type: object additionalProperties: type: array items: type: string /v0/clients/sampleproductionmethods: get: summary: Get all sample production methods description: Returns a list of all sample production methods (hidden from public documentation). operationId: getClientSampleProductionMethods tags: - Reference Data security: - ApiKeyAuth: [] responses: '200': description: Successful response with list of production methods content: application/json: schema: type: object required: - success - sample_production_methods properties: success: type: boolean example: true sample_production_methods: type: array items: type: object '401': description: Authentication failed content: application/json: schema: type: object description: Error response required: - success - error_code - error_message properties: success: type: boolean example: false error_code: type: string example: missing_api_key error_message: type: string example: Missing API key header error_details: type: object additionalProperties: type: array items: type: string '403': description: Access denied content: application/json: schema: type: object description: Error response required: - success - error_code - error_message properties: success: type: boolean example: false error_code: type: string example: permission_denied error_message: type: string example: Access denied error_details: type: object additionalProperties: type: array items: type: string /v0/clients/sampleclassifications: get: summary: Get all sample classifications description: Returns a list of all sample classifications (hidden from public documentation). operationId: getClientSampleClassifications tags: - Reference Data security: - ApiKeyAuth: [] responses: '200': description: Successful response with list of sample classifications content: application/json: schema: type: object required: - success - sample_classifications properties: success: type: boolean example: true sample_classifications: type: array items: type: object '401': description: Authentication failed content: application/json: schema: type: object description: Error response required: - success - error_code - error_message properties: success: type: boolean example: false error_code: type: string example: missing_api_key error_message: type: string example: Missing API key header error_details: type: object additionalProperties: type: array items: type: string '403': description: Access denied content: application/json: schema: type: object description: Error response required: - success - error_code - error_message properties: success: type: boolean example: false error_code: type: string example: permission_denied error_message: type: string example: Access denied error_details: type: object additionalProperties: type: array items: type: string /v0/compounds: get: summary: Get all compounds description: Returns a list of all compounds and compound synonyms in Confident Cannabis. This includes alternate spellings and synonyms. All compounds listed can be used in test results submission using the `name` parameter. Response is cached for 30 minutes. operationId: getCompounds tags: - Reference Data security: - ApiKeyAuth: [] responses: '200': description: Successful response with list of compounds headers: Cache-Control: description: Cache duration schema: type: string example: max-age=1800 content: application/json: schema: type: object description: Response containing list of compounds required: - success - compounds properties: success: type: boolean description: Whether the request was successful example: true compounds: type: array description: Array of compounds and compound synonyms items: type: object description: A compound or compound synonym that can be used in test results required: - category - name - display_name - is_synonym - synonym_for_compound_name properties: category: type: string description: Test category under which this compound is normally tested example: Cannabinoids name: type: string description: Unique name used to identify the compound. Use this value when submitting test results. example: thc display_name: type: string description: Human-readable display name for the compound example: THC is_synonym: type: boolean description: True if this is a synonym for another compound, false if it is a primary compound example: false synonym_for_compound_name: type: string description: If is_synonym is true, this contains the name of the primary compound. Empty string otherwise. example: '' examples: success: summary: Successful compounds response value: success: true compounds: - category: Cannabinoids name: thc display_name: THC is_synonym: false synonym_for_compound_name: '' - category: Cannabinoids name: cbd display_name: CBD is_synonym: false synonym_for_compound_name: '' - category: Cannabinoids name: thca display_name: THCa is_synonym: false synonym_for_compound_name: '' - category: Terpenes name: limonene display_name: Limonene is_synonym: false synonym_for_compound_name: '' - category: Terpenes name: d-limonene display_name: d-Limonene is_synonym: true synonym_for_compound_name: limonene '401': description: Authentication failed - missing or invalid API key, signature, or timestamp content: application/json: schema: type: object description: Error response returned when a request fails required: - success - error_code - error_message properties: success: type: boolean description: Always false for error responses example: false error_code: type: string description: Machine-readable error code enum: - missing_api_key - invalid_api_key - missing_signature - invalid_signature - missing_timestamp - request_too_old - api_access_denied - api_access_restricted - permission_denied - invalid_request - not_found example: missing_api_key error_message: type: string description: Human-readable error message example: Missing API key header error_details: type: object description: Additional error details (e.g., validation errors) additionalProperties: type: array items: type: string examples: missing_api_key: summary: Missing API key value: success: false error_code: missing_api_key error_message: Missing API key header invalid_api_key: summary: Invalid API key value: success: false error_code: invalid_api_key error_message: Invalid API key invalid_signature: summary: Invalid signature value: success: false error_code: invalid_signature error_message: Signature verification failed '403': description: Access denied - insufficient permissions content: application/json: schema: type: object description: Error response returned when a request fails required: - success - error_code - error_message properties: success: type: boolean description: Always false for error responses example: false error_code: type: string description: Machine-readable error code enum: - missing_api_key - invalid_api_key - missing_signature - invalid_signature - missing_timestamp - request_too_old - api_access_denied - api_access_restricted - permission_denied - invalid_request - not_found example: permission_denied error_message: type: string description: Human-readable error message example: You do not have permission to access this resource error_details: type: object description: Additional error details (e.g., validation errors) additionalProperties: type: array items: type: string examples: permission_denied: summary: Permission denied value: success: false error_code: permission_denied error_message: You do not have permission to access this resource /v0/testtypes: get: summary: Get all test types description: Returns a list of all available test types in the system. operationId: getTestTypes tags: - Reference Data security: - ApiKeyAuth: [] responses: '200': description: Successful response with list of test types content: application/json: schema: type: object description: Response containing list of test types required: - success - test_types properties: success: type: boolean description: Whether the request was successful example: true test_types: type: array description: Array of test types items: type: object description: A test type available in the system required: - id - name - abbreviation properties: id: type: integer description: Unique ID for the test type example: 1 name: type: string description: Full name of the test type example: Potency abbreviation: type: string description: Short abbreviation for the test type example: POT examples: success: summary: Successful test types response value: success: true test_types: - id: 1 name: Potency abbreviation: POT - id: 2 name: Terpenes abbreviation: TERP - id: 3 name: Pesticides abbreviation: PEST - id: 4 name: Microbials abbreviation: MICRO - id: 5 name: Heavy Metals abbreviation: METALS '401': description: Authentication failed - missing or invalid API key, signature, or timestamp content: application/json: schema: type: object description: Error response returned when a request fails required: - success - error_code - error_message properties: success: type: boolean description: Always false for error responses example: false error_code: type: string description: Machine-readable error code enum: - missing_api_key - invalid_api_key - missing_signature - invalid_signature - missing_timestamp - request_too_old - api_access_denied - api_access_restricted - permission_denied - invalid_request - not_found example: missing_api_key error_message: type: string description: Human-readable error message example: Missing API key header error_details: type: object description: Additional error details (e.g., validation errors) additionalProperties: type: array items: type: string examples: missing_api_key: summary: Missing API key value: success: false error_code: missing_api_key error_message: Missing API key header invalid_api_key: summary: Invalid API key value: success: false error_code: invalid_api_key error_message: Invalid API key invalid_signature: summary: Invalid signature value: success: false error_code: invalid_signature error_message: Signature verification failed '403': description: Access denied - insufficient permissions content: application/json: schema: type: object description: Error response returned when a request fails required: - success - error_code - error_message properties: success: type: boolean description: Always false for error responses example: false error_code: type: string description: Machine-readable error code enum: - missing_api_key - invalid_api_key - missing_signature - invalid_signature - missing_timestamp - request_too_old - api_access_denied - api_access_restricted - permission_denied - invalid_request - not_found example: permission_denied error_message: type: string description: Human-readable error message example: You do not have permission to access this resource error_details: type: object description: Additional error details (e.g., validation errors) additionalProperties: type: array items: type: string examples: permission_denied: summary: Permission denied value: success: false error_code: permission_denied error_message: You do not have permission to access this resource /v0/sampletypes: get: summary: Get all sample types description: Returns a list of all sample types with their associated categories. operationId: getSampleTypes tags: - Reference Data security: - ApiKeyAuth: [] responses: '200': description: Successful response with list of sample types content: application/json: schema: type: object description: Response containing list of sample types required: - success - sample_types properties: success: type: boolean description: Whether the request was successful example: true sample_types: type: array description: Array of sample types items: type: object description: A sample type with its associated category required: - id - name - category_id - category_name properties: id: type: integer description: Unique ID for the sample type example: 1 name: type: string description: Name of the sample type example: Flower category_id: type: integer description: ID of the category this sample type belongs to example: 1 category_name: type: string description: Name of the category this sample type belongs to example: Cannabis Product examples: success: summary: Successful sample types response value: success: true sample_types: - id: 1 name: Flower category_id: 1 category_name: Cannabis Product - id: 2 name: Concentrate category_id: 1 category_name: Cannabis Product - id: 3 name: Edible category_id: 2 category_name: Infused Product '401': description: Authentication failed - missing or invalid API key, signature, or timestamp content: application/json: schema: type: object description: Error response returned when a request fails required: - success - error_code - error_message properties: success: type: boolean description: Always false for error responses example: false error_code: type: string description: Machine-readable error code enum: - missing_api_key - invalid_api_key - missing_signature - invalid_signature - missing_timestamp - request_too_old - api_access_denied - api_access_restricted - permission_denied - invalid_request - not_found example: missing_api_key error_message: type: string description: Human-readable error message example: Missing API key header error_details: type: object description: Additional error details (e.g., validation errors) additionalProperties: type: array items: type: string examples: missing_api_key: summary: Missing API key value: success: false error_code: missing_api_key error_message: Missing API key header invalid_api_key: summary: Invalid API key value: success: false error_code: invalid_api_key error_message: Invalid API key invalid_signature: summary: Invalid signature value: success: false error_code: invalid_signature error_message: Signature verification failed '403': description: Access denied - insufficient permissions content: application/json: schema: type: object description: Error response returned when a request fails required: - success - error_code - error_message properties: success: type: boolean description: Always false for error responses example: false error_code: type: string description: Machine-readable error code enum: - missing_api_key - invalid_api_key - missing_signature - invalid_signature - missing_timestamp - request_too_old - api_access_denied - api_access_restricted - permission_denied - invalid_request - not_found example: permission_denied error_message: type: string description: Human-readable error message example: You do not have permission to access this resource error_details: type: object description: Additional error details (e.g., validation errors) additionalProperties: type: array items: type: string examples: permission_denied: summary: Permission denied value: success: false error_code: permission_denied error_message: You do not have permission to access this resource /v0/samplecategories: get: summary: Get all sample categories description: Returns a list of all sample categories. operationId: getSampleCategories tags: - Reference Data security: - ApiKeyAuth: [] responses: '200': description: Successful response with list of sample categories content: application/json: schema: type: object description: Response containing list of sample categories required: - success - sample_categories properties: success: type: boolean description: Whether the request was successful example: true sample_categories: type: array description: Array of sample categories items: type: object description: A category for grouping sample types required: - id - name properties: id: type: integer description: Unique ID for the sample category example: 1 name: type: string description: Name of the sample category example: Cannabis Product examples: success: summary: Successful sample categories response value: success: true sample_categories: - id: 1 name: Cannabis Product - id: 2 name: Infused Product - id: 3 name: Plant Material '401': description: Authentication failed - missing or invalid API key, signature, or timestamp content: application/json: schema: type: object description: Error response returned when a request fails required: - success - error_code - error_message properties: success: type: boolean description: Always false for error responses example: false error_code: type: string description: Machine-readable error code enum: - missing_api_key - invalid_api_key - missing_signature - invalid_signature - missing_timestamp - request_too_old - api_access_denied - api_access_restricted - permission_denied - invalid_request - not_found example: missing_api_key error_message: type: string description: Human-readable error message example: Missing API key header error_details: type: object description: Additional error details (e.g., validation errors) additionalProperties: type: array items: type: string examples: missing_api_key: summary: Missing API key value: success: false error_code: missing_api_key error_message: Missing API key header invalid_api_key: summary: Invalid API key value: success: false error_code: invalid_api_key error_message: Invalid API key invalid_signature: summary: Invalid signature value: success: false error_code: invalid_signature error_message: Signature verification failed '403': description: Access denied - insufficient permissions content: application/json: schema: type: object description: Error response returned when a request fails required: - success - error_code - error_message properties: success: type: boolean description: Always false for error responses example: false error_code: type: string description: Machine-readable error code enum: - missing_api_key - invalid_api_key - missing_signature - invalid_signature - missing_timestamp - request_too_old - api_access_denied - api_access_restricted - permission_denied - invalid_request - not_found example: permission_denied error_message: type: string description: Human-readable error message example: You do not have permission to access this resource error_details: type: object description: Additional error details (e.g., validation errors) additionalProperties: type: array items: type: string examples: permission_denied: summary: Permission denied value: success: false error_code: permission_denied error_message: You do not have permission to access this resource /v0/sampleproductionmethods: get: summary: Get all sample production methods description: Returns a list of all sample production/extraction methods. operationId: getSampleProductionMethods tags: - Reference Data security: - ApiKeyAuth: [] responses: '200': description: Successful response with list of production methods content: application/json: schema: type: object description: Response containing list of sample production methods required: - success - sample_production_methods properties: success: type: boolean description: Whether the request was successful example: true sample_production_methods: type: array description: Array of production methods items: type: object description: A production or extraction method for samples required: - id - name properties: id: type: integer description: Unique ID for the production method example: 1 name: type: string description: Name of the production method example: CO2 Extraction examples: success: summary: Successful production methods response value: success: true sample_production_methods: - id: 1 name: CO2 Extraction - id: 2 name: Ethanol Extraction - id: 3 name: Hydrocarbon Extraction - id: 4 name: Solventless '401': description: Authentication failed - missing or invalid API key, signature, or timestamp content: application/json: schema: type: object description: Error response returned when a request fails required: - success - error_code - error_message properties: success: type: boolean description: Always false for error responses example: false error_code: type: string description: Machine-readable error code enum: - missing_api_key - invalid_api_key - missing_signature - invalid_signature - missing_timestamp - request_too_old - api_access_denied - api_access_restricted - permission_denied - invalid_request - not_found example: missing_api_key error_message: type: string description: Human-readable error message example: Missing API key header error_details: type: object description: Additional error details (e.g., validation errors) additionalProperties: type: array items: type: string examples: missing_api_key: summary: Missing API key value: success: false error_code: missing_api_key error_message: Missing API key header invalid_api_key: summary: Invalid API key value: success: false error_code: invalid_api_key error_message: Invalid API key invalid_signature: summary: Invalid signature value: success: false error_code: invalid_signature error_message: Signature verification failed '403': description: Access denied - insufficient permissions content: application/json: schema: type: object description: Error response returned when a request fails required: - success - error_code - error_message properties: success: type: boolean description: Always false for error responses example: false error_code: type: string description: Machine-readable error code enum: - missing_api_key - invalid_api_key - missing_signature - invalid_signature - missing_timestamp - request_too_old - api_access_denied - api_access_restricted - permission_denied - invalid_request - not_found example: permission_denied error_message: type: string description: Human-readable error message example: You do not have permission to access this resource error_details: type: object description: Additional error details (e.g., validation errors) additionalProperties: type: array items: type: string examples: permission_denied: summary: Permission denied value: success: false error_code: permission_denied error_message: You do not have permission to access this resource /v0/sampleclassifications: get: summary: Get all sample classifications description: Returns a list of all sample classifications (Indica, Sativa, Hybrid, etc.). operationId: getSampleClassifications tags: - Reference Data security: - ApiKeyAuth: [] responses: '200': description: Successful response with list of sample classifications content: application/json: schema: type: object description: Response containing list of sample classifications required: - success - sample_classifications properties: success: type: boolean description: Whether the request was successful example: true sample_classifications: type: array description: Array of sample classifications items: type: object description: A classification for cannabis samples (strain type) required: - id - name properties: id: type: integer description: Unique ID for the classification example: 1 name: type: string description: Name of the classification example: Indica examples: success: summary: Successful sample classifications response value: success: true sample_classifications: - id: 1 name: Indica - id: 2 name: Sativa - id: 3 name: Hybrid - id: 4 name: CBD '401': description: Authentication failed - missing or invalid API key, signature, or timestamp content: application/json: schema: type: object description: Error response returned when a request fails required: - success - error_code - error_message properties: success: type: boolean description: Always false for error responses example: false error_code: type: string description: Machine-readable error code enum: - missing_api_key - invalid_api_key - missing_signature - invalid_signature - missing_timestamp - request_too_old - api_access_denied - api_access_restricted - permission_denied - invalid_request - not_found example: missing_api_key error_message: type: string description: Human-readable error message example: Missing API key header error_details: type: object description: Additional error details (e.g., validation errors) additionalProperties: type: array items: type: string examples: missing_api_key: summary: Missing API key value: success: false error_code: missing_api_key error_message: Missing API key header invalid_api_key: summary: Invalid API key value: success: false error_code: invalid_api_key error_message: Invalid API key invalid_signature: summary: Invalid signature value: success: false error_code: invalid_signature error_message: Signature verification failed '403': description: Access denied - insufficient permissions content: application/json: schema: type: object description: Error response returned when a request fails required: - success - error_code - error_message properties: success: type: boolean description: Always false for error responses example: false error_code: type: string description: Machine-readable error code enum: - missing_api_key - invalid_api_key - missing_signature - invalid_signature - missing_timestamp - request_too_old - api_access_denied - api_access_restricted - permission_denied - invalid_request - not_found example: permission_denied error_message: type: string description: Human-readable error message example: You do not have permission to access this resource error_details: type: object description: Additional error details (e.g., validation errors) additionalProperties: type: array items: type: string examples: permission_denied: summary: Permission denied value: success: false error_code: permission_denied error_message: You do not have permission to access this resource /v0/orderstatuses: get: summary: Get all order statuses description: Returns a list of all possible order statuses and their IDs. operationId: getOrderStatuses tags: - Reference Data security: - ApiKeyAuth: [] responses: '200': description: Successful response with list of order statuses content: application/json: schema: type: object description: Response containing list of order statuses required: - success - order_statuses properties: success: type: boolean description: Whether the request was successful example: true order_statuses: type: array description: Array of order statuses items: type: object description: A possible status for an order required: - id - name properties: id: type: integer description: Unique ID for the order status example: 1 name: type: string description: Name of the order status example: Placed description: type: string description: Description of what this status means example: Order has been placed but not yet verified examples: success: summary: Successful order statuses response value: success: true order_statuses: - id: 1 name: Placed description: Order has been placed but not yet verified - id: 3 name: In Progress description: Order is currently being processed - id: 4 name: Completed description: Order has been completed - id: 5 name: Canceled description: Order has been canceled '401': description: Authentication failed - missing or invalid API key, signature, or timestamp content: application/json: schema: type: object description: Error response returned when a request fails required: - success - error_code - error_message properties: success: type: boolean description: Always false for error responses example: false error_code: type: string description: Machine-readable error code enum: - missing_api_key - invalid_api_key - missing_signature - invalid_signature - missing_timestamp - request_too_old - api_access_denied - api_access_restricted - permission_denied - invalid_request - not_found example: missing_api_key error_message: type: string description: Human-readable error message example: Missing API key header error_details: type: object description: Additional error details (e.g., validation errors) additionalProperties: type: array items: type: string examples: missing_api_key: summary: Missing API key value: success: false error_code: missing_api_key error_message: Missing API key header invalid_api_key: summary: Invalid API key value: success: false error_code: invalid_api_key error_message: Invalid API key invalid_signature: summary: Invalid signature value: success: false error_code: invalid_signature error_message: Signature verification failed '403': description: Access denied - insufficient permissions content: application/json: schema: type: object description: Error response returned when a request fails required: - success - error_code - error_message properties: success: type: boolean description: Always false for error responses example: false error_code: type: string description: Machine-readable error code enum: - missing_api_key - invalid_api_key - missing_signature - invalid_signature - missing_timestamp - request_too_old - api_access_denied - api_access_restricted - permission_denied - invalid_request - not_found example: permission_denied error_message: type: string description: Human-readable error message example: You do not have permission to access this resource error_details: type: object description: Additional error details (e.g., validation errors) additionalProperties: type: array items: type: string examples: permission_denied: summary: Permission denied value: success: false error_code: permission_denied error_message: You do not have permission to access this resource /v0/labs/testpackages: get: summary: Get test packages description: Returns a list of active test packages for this lab. operationId: getTestPackages tags: - Reference Data responses: '200': description: Successful response with list of test packages content: application/json: schema: type: object required: - success - test_packages properties: success: type: boolean example: true test_packages: type: array items: type: object '401': description: Authentication failed content: application/json: schema: type: object required: - success - error_code - error_message properties: success: type: boolean example: false error_code: type: string error_message: type: string error_details: type: object '403': description: Access denied content: application/json: schema: type: object required: - success - error_code - error_message properties: success: type: boolean example: false error_code: type: string error_message: type: string error_details: type: object /v0/labs/testtypes: get: summary: Get test types description: Returns a list of all available test types (accessible to both labs and clients). operationId: getLabTestTypes tags: - Reference Data responses: '200': description: Successful response content: application/json: schema: type: object required: - success - test_types properties: success: type: boolean example: true test_types: type: array items: type: object '401': description: Authentication failed content: application/json: schema: type: object required: - success - error_code - error_message properties: success: type: boolean example: false error_code: type: string error_message: type: string error_details: type: object '403': description: Access denied content: application/json: schema: type: object required: - success - error_code - error_message properties: success: type: boolean example: false error_code: type: string error_message: type: string error_details: type: object /v0/labs/compounds: get: summary: Get compounds description: Returns a list of all compounds (accessible to both labs and clients). operationId: getLabCompounds tags: - Reference Data responses: '200': description: Successful response content: application/json: schema: type: object required: - success - compounds properties: success: type: boolean example: true compounds: type: array items: type: object '401': description: Authentication failed content: application/json: schema: type: object required: - success - error_code - error_message properties: success: type: boolean example: false error_code: type: string error_message: type: string error_details: type: object '403': description: Access denied content: application/json: schema: type: object required: - success - error_code - error_message properties: success: type: boolean example: false error_code: type: string error_message: type: string error_details: type: object components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-ConfidentCannabis-APIKey description: API key for authentication. Required for all requests. SignatureAuth: type: apiKey in: header name: X-ConfidentCannabis-Signature description: HMAC SHA256 signature of the request. Required if signing is enabled for your API credentials. TimestampAuth: type: apiKey in: header name: X-ConfidentCannabis-Timestamp description: Unix timestamp of the request. Required if signing is enabled. Must be within 30 seconds of server time.