openapi: 3.0.3
info:
  title: 'InCheck API for Solution Providers'
  description: 'InCheck API for Solution Providers'
  version: 1.0.0
servers:
  -
    url: 'https://staging-api.vm400.consulting1x1.info'
tags:
  -
    name: Chemical
    description: ''
  -
    name: InCheck
    description: ''
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: 'Retrieve a token by calling the `/auth/login` endpoint.'
security:
  -
    default: []
paths:
  '/api/organisation/{organisation_reference_id}/chemical/inventory/bulk/store':
    post:
      summary: 'Bulk Store'
      operationId: bulkStore
      description: 'Store a new chemical inventory bulk'
      parameters: []
      responses: {  }
      tags:
        - Chemical
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                inventories:
                  type: array
                  description: ''
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      year:
                        type: integer
                        description: 'Must be at least 2000. Must not be greater than 2100.'
                        example: 11
                      month:
                        type: integer
                        description: 'Must be at least 1. Must not be greater than 12.'
                        example: 11
                      submit:
                        type: boolean
                        description: ''
                        example: false
                        nullable: true
                      products:
                        type: array
                        description: ''
                        example:
                          - []
                        items:
                          type: object
                          properties:
                            chemical_product_id:
                              type: integer
                              description: 'This field is required when <code>name</code> is not present. The <code>id</code> of an existing record in the chemical_products table.'
                              example: 3
                            formulator_name:
                              type: string
                              description: 'Must not be greater than 255 characters.'
                              example: dad
                            name:
                              type: string
                              description: 'This field is required when <code>chemical_product_id</code> is not present.'
                              example: quo
                            weight:
                              type: number
                              description: 'Must be at least 0.'
                              example: 60
                          required:
                            - formulator_name
                            - weight
                    required:
                      - year
                      - month
              required:
                - inventories
    parameters:
      -
        in: path
        name: organisation_reference_id
        description: 'The ID of the organisation reference.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/organisation/{organisation_reference_id}/chemical/inventory/{id}':
    put:
      summary: Update
      operationId: update
      description: 'Update an existing chemical inventory'
      parameters: []
      responses: {  }
      tags:
        - Chemical
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                year:
                  type: integer
                  description: 'Must be at least 2000. Must not be greater than 2100.'
                  example: 6
                month:
                  type: integer
                  description: 'Must be at least 1. Must not be greater than 12.'
                  example: 7
                submit:
                  type: boolean
                  description: ''
                  example: true
                  nullable: true
              required:
                - year
                - month
    parameters:
      -
        in: path
        name: organisation_reference_id
        description: 'The ID of the organisation reference.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the inventory.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/organisation/{organisation_reference_id}/chemical/inventory/{inventory_id}/decline':
    post:
      summary: Decline
      operationId: decline
      description: 'Decline a chemical inventory'
      parameters: []
      responses: {  }
      tags:
        - Chemical
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  description: ''
                  example: 'Duplicate submission'
                  enum:
                    - 'Data inaccuracy detected'
                    - 'Incomplete product information'
                    - 'Non-compliance with MRSL requirements'
                    - 'Missing supporting documentation'
                    - 'Duplicate submission'
                    - 'Out of reporting period scope'
                    - 'Other (please specify below)'
                additional_info:
                  type: string
                  description: ''
                  example: sequi
                  nullable: true
              required:
                - reason
    parameters:
      -
        in: path
        name: organisation_reference_id
        description: 'The ID of the organisation reference.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: inventory_id
        description: 'The ID of the inventory.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/organisation/{organisation_reference_id}/chemical/inventory/{inventory_id}/publish':
    post:
      summary: Publish
      operationId: publish
      description: "Publish a chemical inventory. Only one report can be published per month.\nHigher-level reports can upgrade (replace) lower-level published reports."
      parameters: []
      responses: {  }
      tags:
        - Chemical
    parameters:
      -
        in: path
        name: organisation_reference_id
        description: 'The ID of the organisation reference.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: inventory_id
        description: 'The ID of the inventory.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/organisation/{organisation_reference_id}/chemical/inventory/{supplier_inventory_id}/product':
    get:
      summary: Index
      operationId: index
      description: 'List all products of a given inventory'
      parameters:
        -
          in: query
          name: per_page
          description: 'Number of items to show per page. Defaults to 50'
          example: 3
          required: false
          schema:
            type: integer
            description: 'Number of items to show per page. Defaults to 50'
            example: 3
        -
          in: query
          name: search
          description: 'Search in all of these columns: name'
          example: quis
          required: false
          schema:
            type: string
            description: 'Search in all of these columns: name'
            example: quis
        -
          in: query
          name: page
          description: 'the page number to show.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'the page number to show.'
            example: 1
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Token not found'
                properties:
                  message:
                    type: string
                    example: 'Token not found'
      tags:
        - Chemical
    post:
      summary: Store
      operationId: store
      description: 'Store a custom product'
      parameters: []
      responses: {  }
      tags:
        - Chemical
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                chemical_product_id:
                  type: integer
                  description: 'This field is required when <code>name</code> is not present. The <code>id</code> of an existing record in the chemical_products table.'
                  example: 19
                formulator_name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: mhmomk
                name:
                  type: string
                  description: 'This field is required when <code>chemical_product_id</code> is not present.'
                  example: quo
                weight:
                  type: number
                  description: 'Must be at least 0.'
                  example: 70
              required:
                - formulator_name
                - weight
    parameters:
      -
        in: path
        name: organisation_reference_id
        description: 'The ID of the organisation reference.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: supplier_inventory_id
        description: 'The ID of the supplier inventory.'
        example: dolorem
        required: true
        schema:
          type: string
  '/api/organisation/{organisation_reference_id}/chemical/inventory/{supplier_inventory_id}/product/{id}':
    put:
      summary: Update
      operationId: update
      description: 'Update a custom product'
      parameters: []
      responses: {  }
      tags:
        - Chemical
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                chemical_product_id:
                  type: integer
                  description: 'This field is required when <code>name</code> is not present. The <code>id</code> of an existing record in the chemical_products table.'
                  example: 9
                formulator_name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: fiq
                name:
                  type: string
                  description: 'This field is required when <code>chemical_product_id</code> is not present.'
                  example: voluptas
                weight:
                  type: number
                  description: 'Must be at least 0.'
                  example: 49
              required:
                - formulator_name
                - weight
    delete:
      summary: Destroy
      operationId: destroy
      description: 'Destroy a custom product'
      parameters: []
      responses: {  }
      tags:
        - Chemical
    parameters:
      -
        in: path
        name: organisation_reference_id
        description: 'The ID of the organisation reference.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: supplier_inventory_id
        description: 'The ID of the supplier inventory.'
        example: autem
        required: true
        schema:
          type: string
      -
        in: path
        name: id
        description: 'The ID of the product.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/organisation/{organisation_id}/chemical/product':
    get:
      summary: Index
      operationId: index
      description: 'Get Products'
      parameters:
        -
          in: query
          name: per_page
          description: 'Number of items to show per page. Defaults to 100'
          example: 9
          required: false
          schema:
            type: integer
            description: 'Number of items to show per page. Defaults to 100'
            example: 9
        -
          in: query
          name: page
          description: 'the page number to show.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'the page number to show.'
            example: 1
        -
          in: query
          name: 'filter[chemical_products.name]'
          description: 'Filter column chemical_products.name by any accepted value. Filter by name'
          example: tenetur
          required: false
          schema:
            type: string
            description: 'Filter column chemical_products.name by any accepted value. Filter by name'
            example: tenetur
        -
          in: query
          name: 'filter[chemical_products.zdhc_pid]'
          description: 'Filter column chemical_products.zdhc_pid by any accepted value. Filter by ZDHC PID'
          example: 3
          required: false
          schema:
            type: integer
            description: 'Filter column chemical_products.zdhc_pid by any accepted value. Filter by ZDHC PID'
            example: 3
        -
          in: query
          name: 'filter[chemical_products.status]'
          description: 'Filter column chemical_products.status by any accepted value. Filter by status'
          example: beatae
          required: false
          schema:
            type: string
            description: 'Filter column chemical_products.status by any accepted value. Filter by status'
            example: beatae
        -
          in: query
          name: 'filter[conformance_level_id]'
          description: 'Filter column conformance_level_id by any accepted value. Filter by conformance level IDs'
          example: 2
          required: false
          schema:
            type: integer
            description: 'Filter column conformance_level_id by any accepted value. Filter by conformance level IDs'
            example: 2
        -
          in: query
          name: 'filter[ctz_level_id]'
          description: 'Filter column ctz_level_id by any accepted value. Filter by CTZ level IDs'
          example: 5
          required: false
          schema:
            type: integer
            description: 'Filter column ctz_level_id by any accepted value. Filter by CTZ level IDs'
            example: 5
        -
          in: query
          name: 'filter[chemical_products.created_at]'
          description: 'Filter column chemical_products.created_at by any accepted value. Filter by created date'
          example: temporibus
          required: false
          schema:
            type: datetime
            description: 'Filter column chemical_products.created_at by any accepted value. Filter by created date'
            example: temporibus
        -
          in: query
          name: 'filter[chemical_products.updated_at]'
          description: 'Filter column chemical_products.updated_at by any accepted value. Filter by updated date'
          example: rerum
          required: false
          schema:
            type: datetime
            description: 'Filter column chemical_products.updated_at by any accepted value. Filter by updated date'
            example: rerum
        -
          in: query
          name: 'filter[product_use_types.id]'
          description: 'Filter column product_use_types.id by any accepted value. Filter by use type ID (multiple selection allowed)'
          example: 14
          required: false
          schema:
            type: integer
            description: 'Filter column product_use_types.id by any accepted value. Filter by use type ID (multiple selection allowed)'
            example: 14
        -
          in: query
          name: 'filter[product_categories.id]'
          description: 'Filter column product_categories.id by any accepted value. Filter by use type category ID (multiple selection allowed)'
          example: 2
          required: false
          schema:
            type: integer
            description: 'Filter column product_categories.id by any accepted value. Filter by use type category ID (multiple selection allowed)'
            example: 2
        -
          in: query
          name: search
          description: 'Search in all of these columns: chemical_products.name, chemical_products.alternate_names, chemical_products.zdhc_pid'
          example: corporis
          required: false
          schema:
            type: string
            description: 'Search in all of these columns: chemical_products.name, chemical_products.alternate_names, chemical_products.zdhc_pid'
            example: corporis
        -
          in: query
          name: sort
          description: 'sort by any accepted column: chemical_products.id,chemical_products.name,chemical_products.version,chemical_products.status,chemical_products.zdhc_pid,conformance_level_name,ctz_level_name,chemical_products.created_at,chemical_products.updated_at. prefix a "-" before the column name to sort in descending order'
          example: 'chemical_products.id,chemical_products.name,chemical_products.version,chemical_products.status,chemical_products.zdhc_pid,conformance_level_name,ctz_level_name,chemical_products.created_at,chemical_products.updated_at'
          required: false
          schema:
            type: string
            description: 'sort by any accepted column: chemical_products.id,chemical_products.name,chemical_products.version,chemical_products.status,chemical_products.zdhc_pid,conformance_level_name,ctz_level_name,chemical_products.created_at,chemical_products.updated_at. prefix a "-" before the column name to sort in descending order'
            example: 'chemical_products.id,chemical_products.name,chemical_products.version,chemical_products.status,chemical_products.zdhc_pid,conformance_level_name,ctz_level_name,chemical_products.created_at,chemical_products.updated_at'
        -
          in: query
          name: column
          description: 'get a distinct list of filterable values for any of the columns: chemical_products.id, chemical_products.name, chemical_products.version, chemical_products.status, ctz_level_name, conformance_level_name, chemical_products.created_at, chemical_products.updated_at.'
          example: chemical_products.id
          required: false
          schema:
            type: string
            description: 'get a distinct list of filterable values for any of the columns: chemical_products.id, chemical_products.name, chemical_products.version, chemical_products.status, ctz_level_name, conformance_level_name, chemical_products.created_at, chemical_products.updated_at.'
            example: chemical_products.id
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 1
                      reference_id: 20-NTNRYDE6A32E-I
                      organisation_id: 5
                      zdhc_pid: null
                      name: sed
                      version: 1
                      description: null
                      alternate_names: null
                      created_at: '2025-11-14T09:43:25.000000Z'
                      updated_at: '2026-03-05T14:31:28.000000Z'
                      conformance_level_id: null
                      ctz_level_id: null
                      status: DRAFT
                      technical_data_sheet_url: ''
                      conformance_level: null
                      ctz_level: null
                    -
                      id: 1
                      reference_id: 20-NTNRYDE6A32E-I
                      organisation_id: 5
                      zdhc_pid: null
                      name: sed
                      version: 1
                      description: null
                      alternate_names: null
                      created_at: '2025-11-14T09:43:25.000000Z'
                      updated_at: '2026-03-05T14:31:28.000000Z'
                      conformance_level_id: null
                      ctz_level_id: null
                      status: DRAFT
                      technical_data_sheet_url: ''
                      conformance_level: null
                      ctz_level: null
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        reference_id: 20-NTNRYDE6A32E-I
                        organisation_id: 5
                        zdhc_pid: null
                        name: sed
                        version: 1
                        description: null
                        alternate_names: null
                        created_at: '2025-11-14T09:43:25.000000Z'
                        updated_at: '2026-03-05T14:31:28.000000Z'
                        conformance_level_id: null
                        ctz_level_id: null
                        status: DRAFT
                        technical_data_sheet_url: ''
                        conformance_level: null
                        ctz_level: null
                      -
                        id: 1
                        reference_id: 20-NTNRYDE6A32E-I
                        organisation_id: 5
                        zdhc_pid: null
                        name: sed
                        version: 1
                        description: null
                        alternate_names: null
                        created_at: '2025-11-14T09:43:25.000000Z'
                        updated_at: '2026-03-05T14:31:28.000000Z'
                        conformance_level_id: null
                        ctz_level_id: null
                        status: DRAFT
                        technical_data_sheet_url: ''
                        conformance_level: null
                        ctz_level: null
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        reference_id:
                          type: string
                          example: 20-NTNRYDE6A32E-I
                        organisation_id:
                          type: integer
                          example: 5
                        zdhc_pid:
                          type: string
                          example: null
                          nullable: true
                        name:
                          type: string
                          example: sed
                        version:
                          type: integer
                          example: 1
                        description:
                          type: string
                          example: null
                          nullable: true
                        alternate_names:
                          type: string
                          example: null
                          nullable: true
                        created_at:
                          type: string
                          example: '2025-11-14T09:43:25.000000Z'
                        updated_at:
                          type: string
                          example: '2026-03-05T14:31:28.000000Z'
                        conformance_level_id:
                          type: string
                          example: null
                          nullable: true
                        ctz_level_id:
                          type: string
                          example: null
                          nullable: true
                        status:
                          type: string
                          example: DRAFT
                        technical_data_sheet_url:
                          type: string
                          example: ''
                        conformance_level:
                          type: string
                          example: null
                          nullable: true
                        ctz_level:
                          type: string
                          example: null
                          nullable: true
      tags:
        - Chemical
    parameters:
      -
        in: path
        name: organisation_id
        description: 'The ID of the organisation.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/organisation/{organisation_id}/chemical/product/{id}':
    get:
      summary: Show
      operationId: show
      description: 'Show a product'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 1
                    reference_id: 20-NTNRYDE6A32E-I
                    organisation_id: 5
                    zdhc_pid: null
                    name: sed
                    version: 1
                    description: null
                    alternate_names: null
                    created_at: '2025-11-14T09:43:25.000000Z'
                    updated_at: '2026-03-05T14:31:28.000000Z'
                    conformance_level_id: null
                    ctz_level_id: null
                    status: DRAFT
                    technical_data_sheet_url: ''
                    organisation:
                      id: 5
                      reference_id: 01-9YKA6G6TQSUTU-T
                      type_id: 6
                      name: 'test-Chemical formulator System'
                      address_1: '85608 Bridie Highway'
                      address_2: 'Apt. 403'
                      city: 'Port Eloisa'
                      state: Louisiana
                      location: SY
                      zip: '69515'
                      phone: '+13345405228'
                      email: goyette.diamond@schulist.com
                      website: 'http://www.torp.com/'
                      avatar_url: null
                      location_name: Syria
                    conformance_level: null
                    ctz_level: null
                    highest_mrsl_certification: null
                    highest_ctz_certification: null
                    certification_body_assignments: []
                    safety_data_sheets: []
                    certified_safety_data_sheets: []
                    use_types: []
                    activity_logs: []
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      reference_id:
                        type: string
                        example: 20-NTNRYDE6A32E-I
                      organisation_id:
                        type: integer
                        example: 5
                      zdhc_pid:
                        type: string
                        example: null
                        nullable: true
                      name:
                        type: string
                        example: sed
                      version:
                        type: integer
                        example: 1
                      description:
                        type: string
                        example: null
                        nullable: true
                      alternate_names:
                        type: string
                        example: null
                        nullable: true
                      created_at:
                        type: string
                        example: '2025-11-14T09:43:25.000000Z'
                      updated_at:
                        type: string
                        example: '2026-03-05T14:31:28.000000Z'
                      conformance_level_id:
                        type: string
                        example: null
                        nullable: true
                      ctz_level_id:
                        type: string
                        example: null
                        nullable: true
                      status:
                        type: string
                        example: DRAFT
                      technical_data_sheet_url:
                        type: string
                        example: ''
                      organisation:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 5
                          reference_id:
                            type: string
                            example: 01-9YKA6G6TQSUTU-T
                          type_id:
                            type: integer
                            example: 6
                          name:
                            type: string
                            example: 'test-Chemical formulator System'
                          address_1:
                            type: string
                            example: '85608 Bridie Highway'
                          address_2:
                            type: string
                            example: 'Apt. 403'
                          city:
                            type: string
                            example: 'Port Eloisa'
                          state:
                            type: string
                            example: Louisiana
                          location:
                            type: string
                            example: SY
                          zip:
                            type: string
                            example: '69515'
                          phone:
                            type: string
                            example: '+13345405228'
                          email:
                            type: string
                            example: goyette.diamond@schulist.com
                          website:
                            type: string
                            example: 'http://www.torp.com/'
                          avatar_url:
                            type: string
                            example: null
                            nullable: true
                          location_name:
                            type: string
                            example: Syria
                      conformance_level:
                        type: string
                        example: null
                        nullable: true
                      ctz_level:
                        type: string
                        example: null
                        nullable: true
                      highest_mrsl_certification:
                        type: string
                        example: null
                        nullable: true
                      highest_ctz_certification:
                        type: string
                        example: null
                        nullable: true
                      certification_body_assignments:
                        type: array
                        example: []
                      safety_data_sheets:
                        type: array
                        example: []
                      certified_safety_data_sheets:
                        type: array
                        example: []
                      use_types:
                        type: array
                        example: []
                      activity_logs:
                        type: array
                        example: []
      tags:
        - Chemical
    parameters:
      -
        in: path
        name: organisation_id
        description: 'The ID of the organisation.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the product.'
        example: 1
        required: true
        schema:
          type: integer
  /api/inventory/eligable-suppliers:
    get:
      summary: 'Eligable Suppliers'
      operationId: eligableSuppliers
      description: 'Show all eligable suppliers for a given Solution Provider'
      parameters:
        -
          in: query
          name: page
          description: 'the page number to show.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'the page number to show.'
            example: 1
        -
          in: query
          name: per_page
          description: 'Number of items to show per page. Defaults to 50'
          example: 9
          required: false
          schema:
            type: integer
            description: 'Number of items to show per page. Defaults to 50'
            example: 9
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 1
                    reference_id: 01-CR698383XMWJ2-P
                    name: 'test-Supplier System'
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      reference_id:
                        type: string
                        example: 01-CR698383XMWJ2-P
                      name:
                        type: string
                        example: 'test-Supplier System'
      tags:
        - InCheck
  '/api/organisation/{organisation_reference_id}/incheck/reports/{report_reference_id}/verified-incheck-report-pdf':
    get:
      summary: Show
      operationId: show
      description: 'Show the verified incheck report as a pdf'
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: 'content of the pdf'
      tags:
        - InCheck
    parameters:
      -
        in: path
        name: organisation_reference_id
        description: 'The ID of the organisation reference.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: report_reference_id
        description: 'The ID of the report reference.'
        example: eos
        required: true
        schema:
          type: string
