openapi: 3.0.3
info:
  title: 'Certification Bodies API'
  description: 'Certification Bodies API'
  version: 1.0.0
servers:
  -
    url: 'https://staging-api.vm400.consulting1x1.info'
tags:
  -
    name: 'Certification Bodies/V1'
    description: ''
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: 'Retrieve a token by calling the `/auth/login` endpoint.'
security:
  -
    default: []
paths:
  '/api/certification-bodies/v1/{organisation_id}/ctz-standard':
    get:
      summary: 'List CTZ standards'
      operationId: listCTZStandards
      description: 'Returns a paginated list of CTZ standards for this certification body.'
      parameters:
        -
          in: query
          name: per_page
          description: 'Number of items to show per page. Defaults to 100'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Number of items to show per page. Defaults to 100'
            example: 1
        -
          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[name]'
          description: 'Filter column name by any accepted value. Filter by CTZ standard name'
          example: vero
          required: false
          schema:
            type: string
            description: 'Filter column name by any accepted value. Filter by CTZ standard name'
            example: vero
        -
          in: query
          name: 'filter[version]'
          description: 'Filter column version by any accepted value. Filter by CTZ standard version'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Filter column version by any accepted value. Filter by CTZ standard version'
            example: 1
        -
          in: query
          name: 'filter[ctz_level_id]'
          description: 'Filter column ctz_level_id by any accepted value. Filter by CTZ level ID'
          example: 11
          required: false
          schema:
            type: integer
            description: 'Filter column ctz_level_id by any accepted value. Filter by CTZ level ID'
            example: 11
        -
          in: query
          name: 'filter[ctz_level_name]'
          description: 'Filter column ctz_level_name by any accepted value. Filter by CTZ level name'
          example: est
          required: false
          schema:
            type: string
            description: 'Filter column ctz_level_name by any accepted value. Filter by CTZ level name'
            example: est
        -
          in: query
          name: 'filter[status]'
          description: 'Filter column status by any accepted value. Matches exact value.'
          example: FAILED
          required: false
          schema:
            type: string
            description: 'Filter column status by any accepted value. Matches exact value.'
            example: FAILED
            enum:
              - FAILED
              - PASSED
        -
          in: query
          name: 'filter[start_date]'
          description: 'Filter column start_date by any accepted value. Filter by start date of CTZ standard validity period'
          example: '< 2026-05-11 10:15:45'
          required: false
          schema:
            type: datetime
            description: 'Filter column start_date by any accepted value. Filter by start date of CTZ standard validity period'
            example: '< 2026-05-11 10:15:45'
        -
          in: query
          name: 'filter[end_date]'
          description: 'Filter column end_date by any accepted value. Filter by end date of CTZ standard validity period'
          example: '< 2026-04-30 10:15:45'
          required: false
          schema:
            type: datetime
            description: 'Filter column end_date by any accepted value. Filter by end date of CTZ standard validity period'
            example: '< 2026-04-30 10:15:45'
        -
          in: query
          name: 'filter[created_at]'
          description: 'Filter column created_at by any accepted value. Filter by CTZ standard created date'
          example: '>= 2026-05-03 10:15:45'
          required: false
          schema:
            type: datetime
            description: 'Filter column created_at by any accepted value. Filter by CTZ standard created date'
            example: '>= 2026-05-03 10:15:45'
        -
          in: query
          name: 'filter[updated_at]'
          description: 'Filter column updated_at by any accepted value. Filter by CTZ standard updated date'
          example: '< 2026-05-15 10:15:45'
          required: false
          schema:
            type: datetime
            description: 'Filter column updated_at by any accepted value. Filter by CTZ standard updated date'
            example: '< 2026-05-15 10:15:45'
        -
          in: query
          name: search
          description: 'Search in all of these columns: name, version, ctz_level_name'
          example: qui
          required: false
          schema:
            type: string
            description: 'Search in all of these columns: name, version, ctz_level_name'
            example: qui
        -
          in: query
          name: sort
          description: 'sort by any accepted column: name, version, status, ctz_level_id, ctz_level_name, start_date, end_date, created_at, updated_at. prefix a "-" before the column name to sort in descending order'
          example: name
          required: false
          schema:
            type: string
            description: 'sort by any accepted column: name, version, status, ctz_level_id, ctz_level_name, start_date, end_date, created_at, updated_at. prefix a "-" before the column name to sort in descending order'
            example: name
        -
          in: query
          name: column
          description: 'get a distinct list of filterable values for any of the columns: name, ctz_level_id, ctz_level_name, version, status, start_date, end_date, created_at, updated_at.'
          example: name
          required: false
          schema:
            type: string
            description: 'get a distinct list of filterable values for any of the columns: name, ctz_level_id, ctz_level_name, version, status, start_date, end_date, created_at, updated_at.'
            example: name
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 47
                      name: Foundational
                      version: '3.1'
                      start_date: '2026-01-01T00:00:00.000000Z'
                      end_date: null
                      status: PASSED
                      expired_at: null
                      ctz_level_id: 1
                      ctz_level_name: Foundational
                    -
                      id: 47
                      name: Foundational
                      version: '3.1'
                      start_date: '2026-01-01T00:00:00.000000Z'
                      end_date: null
                      status: PASSED
                      expired_at: null
                      ctz_level_id: 1
                      ctz_level_name: Foundational
                  links:
                    first: '/?page=1'
                    last: '/?page=1'
                    prev: null
                    next: null
                  meta:
                    current_page: 1
                    from: 1
                    last_page: 1
                    links:
                      -
                        url: null
                        label: '&laquo; Previous'
                        active: false
                      -
                        url: '/?page=1'
                        label: '1'
                        active: true
                      -
                        url: null
                        label: 'Next &raquo;'
                        active: false
                    path: /
                    per_page: 100
                    to: 2
                    total: 2
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 47
                        name: Foundational
                        version: '3.1'
                        start_date: '2026-01-01T00:00:00.000000Z'
                        end_date: null
                        status: PASSED
                        expired_at: null
                        ctz_level_id: 1
                        ctz_level_name: Foundational
                      -
                        id: 47
                        name: Foundational
                        version: '3.1'
                        start_date: '2026-01-01T00:00:00.000000Z'
                        end_date: null
                        status: PASSED
                        expired_at: null
                        ctz_level_id: 1
                        ctz_level_name: Foundational
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 47
                        name:
                          type: string
                          example: Foundational
                        version:
                          type: string
                          example: '3.1'
                        start_date:
                          type: string
                          example: '2026-01-01T00:00:00.000000Z'
                        end_date:
                          type: string
                          example: null
                          nullable: true
                        status:
                          type: string
                          example: PASSED
                        expired_at:
                          type: string
                          example: null
                          nullable: true
                        ctz_level_id:
                          type: integer
                          example: 1
                        ctz_level_name:
                          type: string
                          example: Foundational
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: '/?page=1'
                      last:
                        type: string
                        example: '/?page=1'
                      prev:
                        type: string
                        example: null
                        nullable: true
                      next:
                        type: string
                        example: null
                        nullable: true
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      from:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                      links:
                        type: array
                        example:
                          -
                            url: null
                            label: '&laquo; Previous'
                            active: false
                          -
                            url: '/?page=1'
                            label: '1'
                            active: true
                          -
                            url: null
                            label: 'Next &raquo;'
                            active: false
                        items:
                          type: object
                          properties:
                            url:
                              type: string
                              example: null
                              nullable: true
                            label:
                              type: string
                              example: '&laquo; Previous'
                            active:
                              type: boolean
                              example: false
                      path:
                        type: string
                        example: /
                      per_page:
                        type: integer
                        example: 100
                      to:
                        type: integer
                        example: 2
                      total:
                        type: integer
                        example: 2
      tags:
        - 'Certification Bodies/V1'
    parameters:
      -
        in: path
        name: organisation_id
        description: 'The ID of the organisation.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/certification-bodies/v1/{organisation_id}/mrsl-standard':
    get:
      summary: 'List MRSL standards'
      operationId: listMRSLStandards
      description: 'Returns a paginated list of MRSL standards for this certification body.'
      parameters:
        -
          in: query
          name: per_page
          description: 'Number of items to show per page. Defaults to 100'
          example: 11
          required: false
          schema:
            type: integer
            description: 'Number of items to show per page. Defaults to 100'
            example: 11
        -
          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[name]'
          description: 'Filter column name by any accepted value. Filter by MRSL standard name'
          example: dolores
          required: false
          schema:
            type: string
            description: 'Filter column name by any accepted value. Filter by MRSL standard name'
            example: dolores
        -
          in: query
          name: 'filter[version]'
          description: 'Filter column version by any accepted value. Filter by MRSL standard version'
          example: 8
          required: false
          schema:
            type: integer
            description: 'Filter column version by any accepted value. Filter by MRSL standard version'
            example: 8
        -
          in: query
          name: 'filter[conformance_level_id]'
          description: 'Filter column conformance_level_id by any accepted value. Filter by conformance level ID'
          example: 6
          required: false
          schema:
            type: integer
            description: 'Filter column conformance_level_id by any accepted value. Filter by conformance level ID'
            example: 6
        -
          in: query
          name: 'filter[conformance_level_name]'
          description: 'Filter column conformance_level_name by any accepted value. Filter by conformance level name'
          example: ratione
          required: false
          schema:
            type: string
            description: 'Filter column conformance_level_name by any accepted value. Filter by conformance level name'
            example: ratione
        -
          in: query
          name: 'filter[status]'
          description: 'Filter column status by any accepted value. Matches exact value.'
          example: FAILED
          required: false
          schema:
            type: string
            description: 'Filter column status by any accepted value. Matches exact value.'
            example: FAILED
            enum:
              - FAILED
              - PASSED
        -
          in: query
          name: 'filter[start_date]'
          description: 'Filter column start_date by any accepted value. Filter by start date of MRSL standard validity period'
          example: '>= 2026-05-17 10:15:45'
          required: false
          schema:
            type: datetime
            description: 'Filter column start_date by any accepted value. Filter by start date of MRSL standard validity period'
            example: '>= 2026-05-17 10:15:45'
        -
          in: query
          name: 'filter[end_date]'
          description: 'Filter column end_date by any accepted value. Filter by end date of MRSL standard validity period'
          example: '<= 2026-04-29 10:15:45'
          required: false
          schema:
            type: datetime
            description: 'Filter column end_date by any accepted value. Filter by end date of MRSL standard validity period'
            example: '<= 2026-04-29 10:15:45'
        -
          in: query
          name: 'filter[created_at]'
          description: 'Filter column created_at by any accepted value. Filter by MRSL standard created date'
          example: '= 2026-05-19 10:15:45'
          required: false
          schema:
            type: datetime
            description: 'Filter column created_at by any accepted value. Filter by MRSL standard created date'
            example: '= 2026-05-19 10:15:45'
        -
          in: query
          name: 'filter[updated_at]'
          description: 'Filter column updated_at by any accepted value. Filter by MRSL standard updated date'
          example: '< 2026-05-04 10:15:45'
          required: false
          schema:
            type: datetime
            description: 'Filter column updated_at by any accepted value. Filter by MRSL standard updated date'
            example: '< 2026-05-04 10:15:45'
        -
          in: query
          name: search
          description: 'Search in all of these columns: name, version, conformance_level_name'
          example: error
          required: false
          schema:
            type: string
            description: 'Search in all of these columns: name, version, conformance_level_name'
            example: error
        -
          in: query
          name: sort
          description: 'sort by any accepted column: name, version, status, conformance_level_id, conformance_level_name, start_date, end_date, created_at, updated_at. prefix a "-" before the column name to sort in descending order'
          example: name
          required: false
          schema:
            type: string
            description: 'sort by any accepted column: name, version, status, conformance_level_id, conformance_level_name, start_date, end_date, created_at, updated_at. prefix a "-" before the column name to sort in descending order'
            example: name
        -
          in: query
          name: column
          description: 'get a distinct list of filterable values for any of the columns: name, conformance_level_id, conformance_level_name, version, status, start_date, end_date, created_at, updated_at.'
          example: name
          required: false
          schema:
            type: string
            description: 'get a distinct list of filterable values for any of the columns: name, conformance_level_id, conformance_level_name, version, status, start_date, end_date, created_at, updated_at.'
            example: name
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 9
                      reference_id: 30-7V7GKLDBKXQA-I
                      name: 'Level 1'
                      version: '3.1'
                      start_date: '2025-12-01T00:00:00.000000Z'
                      end_date: '2027-12-31T00:00:00.000000Z'
                      status: PASSED
                      expired_at: null
                      conformance_level_id: 1
                      conformance_level_name: 'Level 1'
                    -
                      id: 9
                      reference_id: 30-7V7GKLDBKXQA-I
                      name: 'Level 1'
                      version: '3.1'
                      start_date: '2025-12-01T00:00:00.000000Z'
                      end_date: '2027-12-31T00:00:00.000000Z'
                      status: PASSED
                      expired_at: null
                      conformance_level_id: 1
                      conformance_level_name: 'Level 1'
                  links:
                    first: '/?page=1'
                    last: '/?page=1'
                    prev: null
                    next: null
                  meta:
                    current_page: 1
                    from: 1
                    last_page: 1
                    links:
                      -
                        url: null
                        label: '&laquo; Previous'
                        active: false
                      -
                        url: '/?page=1'
                        label: '1'
                        active: true
                      -
                        url: null
                        label: 'Next &raquo;'
                        active: false
                    path: /
                    per_page: 100
                    to: 2
                    total: 2
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 9
                        reference_id: 30-7V7GKLDBKXQA-I
                        name: 'Level 1'
                        version: '3.1'
                        start_date: '2025-12-01T00:00:00.000000Z'
                        end_date: '2027-12-31T00:00:00.000000Z'
                        status: PASSED
                        expired_at: null
                        conformance_level_id: 1
                        conformance_level_name: 'Level 1'
                      -
                        id: 9
                        reference_id: 30-7V7GKLDBKXQA-I
                        name: 'Level 1'
                        version: '3.1'
                        start_date: '2025-12-01T00:00:00.000000Z'
                        end_date: '2027-12-31T00:00:00.000000Z'
                        status: PASSED
                        expired_at: null
                        conformance_level_id: 1
                        conformance_level_name: 'Level 1'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 9
                        reference_id:
                          type: string
                          example: 30-7V7GKLDBKXQA-I
                        name:
                          type: string
                          example: 'Level 1'
                        version:
                          type: string
                          example: '3.1'
                        start_date:
                          type: string
                          example: '2025-12-01T00:00:00.000000Z'
                        end_date:
                          type: string
                          example: '2027-12-31T00:00:00.000000Z'
                        status:
                          type: string
                          example: PASSED
                        expired_at:
                          type: string
                          example: null
                          nullable: true
                        conformance_level_id:
                          type: integer
                          example: 1
                        conformance_level_name:
                          type: string
                          example: 'Level 1'
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: '/?page=1'
                      last:
                        type: string
                        example: '/?page=1'
                      prev:
                        type: string
                        example: null
                        nullable: true
                      next:
                        type: string
                        example: null
                        nullable: true
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      from:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                      links:
                        type: array
                        example:
                          -
                            url: null
                            label: '&laquo; Previous'
                            active: false
                          -
                            url: '/?page=1'
                            label: '1'
                            active: true
                          -
                            url: null
                            label: 'Next &raquo;'
                            active: false
                        items:
                          type: object
                          properties:
                            url:
                              type: string
                              example: null
                              nullable: true
                            label:
                              type: string
                              example: '&laquo; Previous'
                            active:
                              type: boolean
                              example: false
                      path:
                        type: string
                        example: /
                      per_page:
                        type: integer
                        example: 100
                      to:
                        type: integer
                        example: 2
                      total:
                        type: integer
                        example: 2
      tags:
        - 'Certification Bodies/V1'
    parameters:
      -
        in: path
        name: organisation_id
        description: 'The ID of the organisation.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/certification-bodies/v1/{organisation_id}/product-assignment':
    get:
      summary: 'List product assignments'
      operationId: listProductAssignments
      description: 'Returns a paginated list of product assignments for this certification body.'
      parameters:
        -
          in: query
          name: per_page
          description: 'Number of items to show per page. Defaults to 100'
          example: 6
          required: false
          schema:
            type: integer
            description: 'Number of items to show per page. Defaults to 100'
            example: 6
        -
          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[product_id]'
          description: 'Filter column product_id by any accepted value. Filter by product ID'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Filter column product_id by any accepted value. Filter by product ID'
            example: 1
        -
          in: query
          name: 'filter[product_reference_id]'
          description: 'Filter column product_reference_id by any accepted value. Filter by product reference ID'
          example: sapiente
          required: false
          schema:
            type: string
            description: 'Filter column product_reference_id by any accepted value. Filter by product reference ID'
            example: sapiente
        -
          in: query
          name: 'filter[product_name]'
          description: 'Filter column product_name by any accepted value. Filter by product name'
          example: soluta
          required: false
          schema:
            type: string
            description: 'Filter column product_name by any accepted value. Filter by product name'
            example: soluta
        -
          in: query
          name: 'filter[product_alternate_names]'
          description: 'Filter column product_alternate_names by any accepted value. Filter by product alternate names'
          example: voluptas
          required: false
          schema:
            type: string
            description: 'Filter column product_alternate_names by any accepted value. Filter by product alternate names'
            example: voluptas
        -
          in: query
          name: 'filter[assignment_status]'
          description: 'Filter column assignment_status by any accepted value. Matches exact value.'
          example: UNDER_REVIEW
          required: false
          schema:
            type: string
            description: 'Filter column assignment_status by any accepted value. Matches exact value.'
            example: UNDER_REVIEW
            enum:
              - UNDER_REVIEW
              - ACCEPTED
              - EXPIRED
              - DECLINED
        -
          in: query
          name: 'filter[formulator_id]'
          description: 'Filter column formulator_id by any accepted value. Filter by formulator (product owner organisation) ID'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Filter column formulator_id by any accepted value. Filter by formulator (product owner organisation) ID'
            example: 10
        -
          in: query
          name: 'filter[formulator_reference_id]'
          description: 'Filter column formulator_reference_id by any accepted value. Filter by formulator (product owner organisation) reference ID'
          example: omnis
          required: false
          schema:
            type: string
            description: 'Filter column formulator_reference_id by any accepted value. Filter by formulator (product owner organisation) reference ID'
            example: omnis
        -
          in: query
          name: 'filter[formulator_name]'
          description: 'Filter column formulator_name by any accepted value. Filter by formulator (product owner organisation) name'
          example: perspiciatis
          required: false
          schema:
            type: string
            description: 'Filter column formulator_name by any accepted value. Filter by formulator (product owner organisation) name'
            example: perspiciatis
        -
          in: query
          name: 'filter[mrsl_level_id]'
          description: 'Filter column mrsl_level_id by any accepted value. Filter by MRSL level IDs from assignment (pivot max conformance level)'
          example: 2
          required: false
          schema:
            type: integer
            description: 'Filter column mrsl_level_id by any accepted value. Filter by MRSL level IDs from assignment (pivot max conformance level)'
            example: 2
        -
          in: query
          name: 'filter[ctz_level_id]'
          description: 'Filter column ctz_level_id by any accepted value. Filter by CTZ level IDs from assignment (pivot max CTZ level)'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Filter column ctz_level_id by any accepted value. Filter by CTZ level IDs from assignment (pivot max CTZ level)'
            example: 1
        -
          in: query
          name: 'filter[assigned_at]'
          description: 'Filter column assigned_at by any accepted value. Filter by assignment created date'
          example: '< 2026-05-19 10:15:45'
          required: false
          schema:
            type: datetime
            description: 'Filter column assigned_at by any accepted value. Filter by assignment created date'
            example: '< 2026-05-19 10:15:45'
        -
          in: query
          name: 'filter[updated_at]'
          description: 'Filter column updated_at by any accepted value. Filter by assignment updated date'
          example: '< 2026-05-07 10:15:45'
          required: false
          schema:
            type: datetime
            description: 'Filter column updated_at by any accepted value. Filter by assignment updated date'
            example: '< 2026-05-07 10:15:45'
        -
          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: 5
          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: 5
        -
          in: query
          name: 'filter[product_categories_id]'
          description: 'Filter column product_categories_id by any accepted value. Filter by product category ID (multiple selection allowed)'
          example: 7
          required: false
          schema:
            type: integer
            description: 'Filter column product_categories_id by any accepted value. Filter by product category ID (multiple selection allowed)'
            example: 7
        -
          in: query
          name: search
          description: 'Search in all of these columns: product_id, product_reference_id, product_name, product_alternate_names, formulator_name, formulator_reference_id'
          example: impedit
          required: false
          schema:
            type: string
            description: 'Search in all of these columns: product_id, product_reference_id, product_name, product_alternate_names, formulator_name, formulator_reference_id'
            example: impedit
        -
          in: query
          name: sort
          description: 'sort by any accepted column: id, product_id, product_reference_id, product_name, product_description, product_alternate_names, formulator_id, formulator_reference_id, formulator_name, assignment_status, mrsl_level_id, mrsl_level_name, ctz_level_id, ctz_level_name, assigned_at, updated_at. prefix a "-" before the column name to sort in descending order'
          example: id
          required: false
          schema:
            type: string
            description: 'sort by any accepted column: id, product_id, product_reference_id, product_name, product_description, product_alternate_names, formulator_id, formulator_reference_id, formulator_name, assignment_status, mrsl_level_id, mrsl_level_name, ctz_level_id, ctz_level_name, assigned_at, updated_at. prefix a "-" before the column name to sort in descending order'
            example: id
        -
          in: query
          name: column
          description: 'get a distinct list of filterable values for any of the columns: id, product_id, product_reference_id, product_name, product_description, product_alternate_names, formulator_id, formulator_reference_id, formulator_name, assignment_status, mrsl_level_id, mrsl_level_name, ctz_level_id, ctz_level_name, assigned_at, updated_at.'
          example: id
          required: false
          schema:
            type: string
            description: 'get a distinct list of filterable values for any of the columns: id, product_id, product_reference_id, product_name, product_description, product_alternate_names, formulator_id, formulator_reference_id, formulator_name, assignment_status, mrsl_level_id, mrsl_level_name, ctz_level_id, ctz_level_name, assigned_at, updated_at.'
            example: id
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: null
                      product_id: 1
                      product_reference_id: 20-NTNRYDE6A32E-I
                      product_name: sed
                      product_description: null
                      product_alternate_names: null
                      formulator_id: 5
                      formulator_reference_id: 01-9YKA6G6TQSUTU-T
                      formulator_name: 'test-Chemical formulator System'
                      assignment_status: null
                      mrsl_level_id: null
                      mrsl_level_name: null
                      ctz_level_id: null
                      ctz_level_name: null
                      assigned_at: null
                      updated_at: null
                    -
                      id: null
                      product_id: 1
                      product_reference_id: 20-NTNRYDE6A32E-I
                      product_name: sed
                      product_description: null
                      product_alternate_names: null
                      formulator_id: 5
                      formulator_reference_id: 01-9YKA6G6TQSUTU-T
                      formulator_name: 'test-Chemical formulator System'
                      assignment_status: null
                      mrsl_level_id: null
                      mrsl_level_name: null
                      ctz_level_id: null
                      ctz_level_name: null
                      assigned_at: null
                      updated_at: null
                  links:
                    first: '/?page=1'
                    last: '/?page=1'
                    prev: null
                    next: null
                  meta:
                    current_page: 1
                    from: 1
                    last_page: 1
                    links:
                      -
                        url: null
                        label: '&laquo; Previous'
                        active: false
                      -
                        url: '/?page=1'
                        label: '1'
                        active: true
                      -
                        url: null
                        label: 'Next &raquo;'
                        active: false
                    path: /
                    per_page: 100
                    to: 2
                    total: 2
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: null
                        product_id: 1
                        product_reference_id: 20-NTNRYDE6A32E-I
                        product_name: sed
                        product_description: null
                        product_alternate_names: null
                        formulator_id: 5
                        formulator_reference_id: 01-9YKA6G6TQSUTU-T
                        formulator_name: 'test-Chemical formulator System'
                        assignment_status: null
                        mrsl_level_id: null
                        mrsl_level_name: null
                        ctz_level_id: null
                        ctz_level_name: null
                        assigned_at: null
                        updated_at: null
                      -
                        id: null
                        product_id: 1
                        product_reference_id: 20-NTNRYDE6A32E-I
                        product_name: sed
                        product_description: null
                        product_alternate_names: null
                        formulator_id: 5
                        formulator_reference_id: 01-9YKA6G6TQSUTU-T
                        formulator_name: 'test-Chemical formulator System'
                        assignment_status: null
                        mrsl_level_id: null
                        mrsl_level_name: null
                        ctz_level_id: null
                        ctz_level_name: null
                        assigned_at: null
                        updated_at: null
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: null
                          nullable: true
                        product_id:
                          type: integer
                          example: 1
                        product_reference_id:
                          type: string
                          example: 20-NTNRYDE6A32E-I
                        product_name:
                          type: string
                          example: sed
                        product_description:
                          type: string
                          example: null
                          nullable: true
                        product_alternate_names:
                          type: string
                          example: null
                          nullable: true
                        formulator_id:
                          type: integer
                          example: 5
                        formulator_reference_id:
                          type: string
                          example: 01-9YKA6G6TQSUTU-T
                        formulator_name:
                          type: string
                          example: 'test-Chemical formulator System'
                        assignment_status:
                          type: string
                          example: null
                          nullable: true
                        mrsl_level_id:
                          type: string
                          example: null
                          nullable: true
                        mrsl_level_name:
                          type: string
                          example: null
                          nullable: true
                        ctz_level_id:
                          type: string
                          example: null
                          nullable: true
                        ctz_level_name:
                          type: string
                          example: null
                          nullable: true
                        assigned_at:
                          type: string
                          example: null
                          nullable: true
                        updated_at:
                          type: string
                          example: null
                          nullable: true
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: '/?page=1'
                      last:
                        type: string
                        example: '/?page=1'
                      prev:
                        type: string
                        example: null
                        nullable: true
                      next:
                        type: string
                        example: null
                        nullable: true
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      from:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                      links:
                        type: array
                        example:
                          -
                            url: null
                            label: '&laquo; Previous'
                            active: false
                          -
                            url: '/?page=1'
                            label: '1'
                            active: true
                          -
                            url: null
                            label: 'Next &raquo;'
                            active: false
                        items:
                          type: object
                          properties:
                            url:
                              type: string
                              example: null
                              nullable: true
                            label:
                              type: string
                              example: '&laquo; Previous'
                            active:
                              type: boolean
                              example: false
                      path:
                        type: string
                        example: /
                      per_page:
                        type: integer
                        example: 100
                      to:
                        type: integer
                        example: 2
                      total:
                        type: integer
                        example: 2
      tags:
        - 'Certification Bodies/V1'
    parameters:
      -
        in: path
        name: organisation_id
        description: 'The ID of the organisation.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/certification-bodies/v1/{organisation_id}/product-assignment/{id}':
    put:
      summary: "Update a product assignment's certifications"
      operationId: updateAProductAssignmentsCertifications
      description: "The `certifications` array in the request body is the **complete desired state** for this assignment.\nAfter a successful call, the assignment holds **exactly** those certifications (MRSL rows, and CTZ rows\nwhere applicable). Anything already stored on the assignment that is **not** included in the request\nis removed or deactivated server-side—omitting an existing certification therefore **deletes** it\nfrom the assignment's active set."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 14
                    assignment_status: UNDER_REVIEW
                    product:
                      id: 31
                      reference_id: 20-MAMVURD727AJ-P
                      name: cupiditate
                      alternate_names:
                        - 'alternative name'
                      description: null
                      version: 1
                      status: UNDER_REVIEW
                      formulator:
                        id: 32
                        name: 'test-Chemical formulator m.breuer'
                        reference_id: 01-R6MYJM3NE47K4-H
                      safety_data_sheets:
                        -
                          id: 3
                          file_name: test-pdf.pdf
                          version: 1
                          locale: en
                          uploaded_by:
                            id: 32
                            name: 'test-Chemical formulator m.breuer'
                            reference_id: 01-R6MYJM3NE47K4-H
                          file_url: null
                        -
                          id: 17
                          file_name: test-pdf.pdf
                          version: 1
                          locale: en
                          uploaded_by:
                            id: 33
                            name: 'test-ZDHC MRSL Certification Bodies m.breuer'
                            reference_id: 01-TXF8SFVYCQAUD-H
                          file_url: null
                    current_max_mrsl_certification: null
                    current_max_ctz_certification: null
                    mrsl_certifications: []
                    ctz_certifications: []
                    assigned_at: '2025-12-12T09:13:50.000000Z'
                    updated_at: '2025-12-12T16:04:31.000000Z'
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 14
                      assignment_status:
                        type: string
                        example: UNDER_REVIEW
                      product:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 31
                          reference_id:
                            type: string
                            example: 20-MAMVURD727AJ-P
                          name:
                            type: string
                            example: cupiditate
                          alternate_names:
                            type: array
                            example:
                              - 'alternative name'
                            items:
                              type: string
                          description:
                            type: string
                            example: null
                            nullable: true
                          version:
                            type: integer
                            example: 1
                          status:
                            type: string
                            example: UNDER_REVIEW
                          formulator:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 32
                              name:
                                type: string
                                example: 'test-Chemical formulator m.breuer'
                              reference_id:
                                type: string
                                example: 01-R6MYJM3NE47K4-H
                          safety_data_sheets:
                            type: array
                            example:
                              -
                                id: 3
                                file_name: test-pdf.pdf
                                version: 1
                                locale: en
                                uploaded_by:
                                  id: 32
                                  name: 'test-Chemical formulator m.breuer'
                                  reference_id: 01-R6MYJM3NE47K4-H
                                file_url: null
                              -
                                id: 17
                                file_name: test-pdf.pdf
                                version: 1
                                locale: en
                                uploaded_by:
                                  id: 33
                                  name: 'test-ZDHC MRSL Certification Bodies m.breuer'
                                  reference_id: 01-TXF8SFVYCQAUD-H
                                file_url: null
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 3
                                file_name:
                                  type: string
                                  example: test-pdf.pdf
                                version:
                                  type: integer
                                  example: 1
                                locale:
                                  type: string
                                  example: en
                                uploaded_by:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 32
                                    name:
                                      type: string
                                      example: 'test-Chemical formulator m.breuer'
                                    reference_id:
                                      type: string
                                      example: 01-R6MYJM3NE47K4-H
                                file_url:
                                  type: string
                                  example: null
                                  nullable: true
                      current_max_mrsl_certification:
                        type: string
                        example: null
                        nullable: true
                      current_max_ctz_certification:
                        type: string
                        example: null
                        nullable: true
                      mrsl_certifications:
                        type: array
                        example: []
                      ctz_certifications:
                        type: array
                        example: []
                      assigned_at:
                        type: string
                        example: '2025-12-12T09:13:50.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-12T16:04:31.000000Z'
      tags:
        - 'Certification Bodies/V1'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                certifications:
                  type: array
                  description: 'Array of certifications to update. Always a combination of MRSL+Safety Data Sheet or CTZ+Safety Data Sheet.'
                  example: null
                  items:
                    type: object
                    nullable: true
                    properties:
                      mrsl_standard_id:
                        type: integer
                        description: 'MRSL standard ID (integer, must exist in the database and be assigned to the requesting certification body).'
                        example: 1
                      ctz_standard_id:
                        type: integer
                        description: "CTZ standard ID (integer, must exist in the database and be assigned to the requesting certification body).\nNote that the the assignment must have an MRSL certification with a conformance level of at least Level 2 from the same certification body trying to create the CTZ certification."
                        example: 1
                      safety_data_sheet_id:
                        type: integer
                        description: 'Safety data sheet ID (integer, must exist in the database). This will be the safety data sheet the certifications are based on.'
                        example: 1
                    required:
                      - safety_data_sheet_id
    get:
      summary: 'Get a product assignment'
      operationId: getAProductAssignment
      description: 'Returns one assignment, including related certification and product data.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 14
                    assignment_status: UNDER_REVIEW
                    product:
                      id: 31
                      reference_id: 20-MAMVURD727AJ-P
                      name: cupiditate
                      alternate_names:
                        - 'alternative name'
                      description: null
                      version: 1
                      status: UNDER_REVIEW
                      formulator:
                        id: 32
                        name: 'test-Chemical formulator m.breuer'
                        reference_id: 01-R6MYJM3NE47K4-H
                      safety_data_sheets:
                        -
                          id: 3
                          file_name: test-pdf.pdf
                          version: 1
                          locale: en
                          uploaded_by:
                            id: 32
                            name: 'test-Chemical formulator m.breuer'
                            reference_id: 01-R6MYJM3NE47K4-H
                          file_url: null
                        -
                          id: 17
                          file_name: test-pdf.pdf
                          version: 1
                          locale: en
                          uploaded_by:
                            id: 33
                            name: 'test-ZDHC MRSL Certification Bodies m.breuer'
                            reference_id: 01-TXF8SFVYCQAUD-H
                          file_url: null
                    current_max_mrsl_certification: null
                    current_max_ctz_certification: null
                    mrsl_certifications: []
                    ctz_certifications: []
                    assigned_at: '2025-12-12T09:13:50.000000Z'
                    updated_at: '2025-12-12T16:04:31.000000Z'
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 14
                      assignment_status:
                        type: string
                        example: UNDER_REVIEW
                      product:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 31
                          reference_id:
                            type: string
                            example: 20-MAMVURD727AJ-P
                          name:
                            type: string
                            example: cupiditate
                          alternate_names:
                            type: array
                            example:
                              - 'alternative name'
                            items:
                              type: string
                          description:
                            type: string
                            example: null
                            nullable: true
                          version:
                            type: integer
                            example: 1
                          status:
                            type: string
                            example: UNDER_REVIEW
                          formulator:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 32
                              name:
                                type: string
                                example: 'test-Chemical formulator m.breuer'
                              reference_id:
                                type: string
                                example: 01-R6MYJM3NE47K4-H
                          safety_data_sheets:
                            type: array
                            example:
                              -
                                id: 3
                                file_name: test-pdf.pdf
                                version: 1
                                locale: en
                                uploaded_by:
                                  id: 32
                                  name: 'test-Chemical formulator m.breuer'
                                  reference_id: 01-R6MYJM3NE47K4-H
                                file_url: null
                              -
                                id: 17
                                file_name: test-pdf.pdf
                                version: 1
                                locale: en
                                uploaded_by:
                                  id: 33
                                  name: 'test-ZDHC MRSL Certification Bodies m.breuer'
                                  reference_id: 01-TXF8SFVYCQAUD-H
                                file_url: null
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 3
                                file_name:
                                  type: string
                                  example: test-pdf.pdf
                                version:
                                  type: integer
                                  example: 1
                                locale:
                                  type: string
                                  example: en
                                uploaded_by:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 32
                                    name:
                                      type: string
                                      example: 'test-Chemical formulator m.breuer'
                                    reference_id:
                                      type: string
                                      example: 01-R6MYJM3NE47K4-H
                                file_url:
                                  type: string
                                  example: null
                                  nullable: true
                      current_max_mrsl_certification:
                        type: string
                        example: null
                        nullable: true
                      current_max_ctz_certification:
                        type: string
                        example: null
                        nullable: true
                      mrsl_certifications:
                        type: array
                        example: []
                      ctz_certifications:
                        type: array
                        example: []
                      assigned_at:
                        type: string
                        example: '2025-12-12T09:13:50.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-12T16:04:31.000000Z'
      tags:
        - 'Certification Bodies/V1'
    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 assignment.'
        example: 14
        required: true
        schema:
          type: integer
  '/api/certification-bodies/v1/{organisation_id}/product-assignment/bulk-update':
    post:
      summary: 'Bulk-update product assignments'
      operationId: bulkUpdateProductAssignments
      description: "Each element of `certifications` includes an `assignment_id` (product assignment row for this CB).\nRows are grouped by that id: for each assignment, the rows with matching `assignment_id` form the\n**complete desired state** for that assignment only. After the call, each touched assignment holds\nexactly those certifications (same replace semantics as the single update endpoint).\n\nThe response `data` is a summary object (counts and IDs), not a product-assignment API resource collection."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'All submitted IDs were eligible and are now updated.'
                    type: object
                    example:
                      message: 'Product assignments updated successfully'
                      data:
                        submitted_count: 2
                        updated_count: 2
                        updated_ids:
                          - 101
                          - 102
                        not_updateable_count: 0
                        errors: []
                    properties:
                      message:
                        type: string
                        example: 'Product assignments updated successfully'
                      data:
                        type: object
                        properties:
                          submitted_count:
                            type: integer
                            example: 2
                          updated_count:
                            type: integer
                            example: 2
                          updated_ids:
                            type: array
                            example:
                              - 101
                              - 102
                            items:
                              type: integer
                          not_updateable_count:
                            type: integer
                            example: 0
                          errors:
                            type: array
                            example: []
                  -
                    description: 'Some submitted IDs could not be updated (e.g. declined between validation and persistence); those IDs appear under `errors`. Same response shape as full success.'
                    type: object
                    example:
                      message: 'Product assignments partially updated'
                      data:
                        submitted_count: 2
                        updated_count: 1
                        updated_ids:
                          - 101
                        not_updateable_count: 1
                        errors:
                          -
                            assignment_id: 102
                            error: 'Product assignment is already declined'
                    properties:
                      message:
                        type: string
                        example: 'Product assignments partially updated'
                      data:
                        type: object
                        properties:
                          submitted_count:
                            type: integer
                            example: 2
                          updated_count:
                            type: integer
                            example: 1
                          updated_ids:
                            type: array
                            example:
                              - 101
                            items:
                              type: integer
                          not_updateable_count:
                            type: integer
                            example: 1
                          errors:
                            type: array
                            example:
                              -
                                assignment_id: 102
                                error: 'Product assignment is already declined'
                            items:
                              type: object
                              properties:
                                assignment_id:
                                  type: integer
                                  example: 102
                                error:
                                  type: string
                                  example: 'Product assignment is already declined'
      tags:
        - 'Certification Bodies/V1'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                certifications:
                  type: array
                  description: 'Array of certification rows. Each row includes `assignment_id` (product assignment for this certification body). MRSL and/or CTZ fields apply to that assignment only.'
                  example: null
                  items:
                    type: object
                    nullable: true
                    properties:
                      assignment_id:
                        type: integer
                        description: 'Assignment ID (integer, must exist in the database) and be assigned to the requesting certification body) wich you want to certify.'
                        example: 1
                      mrsl_standard_id:
                        type: integer
                        description: 'MRSL standard ID (integer, must exist in the database and be assigned to the requesting certification body).'
                        example: 1
                      ctz_standard_id:
                        type: integer
                        description: "CTZ standard ID (integer, must exist in the database and be assigned to the requesting certification body).\nNote that the the assignment must have an MRSL certification with a conformance level of at least Level 2 from the same certification body trying to create the CTZ certification."
                        example: 1
                      safety_data_sheet_id:
                        type: integer
                        description: 'Safety data sheet ID (integer, must exist in the database). This will be the safety data sheet the certifications are based on.'
                        example: 1
                    required:
                      - assignment_id
                      - safety_data_sheet_id
    parameters:
      -
        in: path
        name: organisation_id
        description: 'The ID of the organisation.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/certification-bodies/v1/{organisation_id}/product-assignment/{product_assignment_id}/decline':
    post:
      summary: 'Decline a product assignment'
      operationId: declineAProductAssignment
      description: 'Marks the assignment identified in the URL as declined for this certification body.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 14
                    assignment_status: UNDER_REVIEW
                    product:
                      id: 31
                      reference_id: 20-MAMVURD727AJ-P
                      name: cupiditate
                      alternate_names:
                        - 'alternative name'
                      description: null
                      version: 1
                      status: UNDER_REVIEW
                      formulator:
                        id: 32
                        name: 'test-Chemical formulator m.breuer'
                        reference_id: 01-R6MYJM3NE47K4-H
                      safety_data_sheets:
                        -
                          id: 3
                          file_name: test-pdf.pdf
                          version: 1
                          locale: en
                          uploaded_by:
                            id: 32
                            name: 'test-Chemical formulator m.breuer'
                            reference_id: 01-R6MYJM3NE47K4-H
                          file_url: null
                        -
                          id: 17
                          file_name: test-pdf.pdf
                          version: 1
                          locale: en
                          uploaded_by:
                            id: 33
                            name: 'test-ZDHC MRSL Certification Bodies m.breuer'
                            reference_id: 01-TXF8SFVYCQAUD-H
                          file_url: null
                    current_max_mrsl_certification: null
                    current_max_ctz_certification: null
                    mrsl_certifications: []
                    ctz_certifications: []
                    assigned_at: '2025-12-12T09:13:50.000000Z'
                    updated_at: '2025-12-12T16:04:31.000000Z'
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 14
                      assignment_status:
                        type: string
                        example: UNDER_REVIEW
                      product:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 31
                          reference_id:
                            type: string
                            example: 20-MAMVURD727AJ-P
                          name:
                            type: string
                            example: cupiditate
                          alternate_names:
                            type: array
                            example:
                              - 'alternative name'
                            items:
                              type: string
                          description:
                            type: string
                            example: null
                            nullable: true
                          version:
                            type: integer
                            example: 1
                          status:
                            type: string
                            example: UNDER_REVIEW
                          formulator:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 32
                              name:
                                type: string
                                example: 'test-Chemical formulator m.breuer'
                              reference_id:
                                type: string
                                example: 01-R6MYJM3NE47K4-H
                          safety_data_sheets:
                            type: array
                            example:
                              -
                                id: 3
                                file_name: test-pdf.pdf
                                version: 1
                                locale: en
                                uploaded_by:
                                  id: 32
                                  name: 'test-Chemical formulator m.breuer'
                                  reference_id: 01-R6MYJM3NE47K4-H
                                file_url: null
                              -
                                id: 17
                                file_name: test-pdf.pdf
                                version: 1
                                locale: en
                                uploaded_by:
                                  id: 33
                                  name: 'test-ZDHC MRSL Certification Bodies m.breuer'
                                  reference_id: 01-TXF8SFVYCQAUD-H
                                file_url: null
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 3
                                file_name:
                                  type: string
                                  example: test-pdf.pdf
                                version:
                                  type: integer
                                  example: 1
                                locale:
                                  type: string
                                  example: en
                                uploaded_by:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 32
                                    name:
                                      type: string
                                      example: 'test-Chemical formulator m.breuer'
                                    reference_id:
                                      type: string
                                      example: 01-R6MYJM3NE47K4-H
                                file_url:
                                  type: string
                                  example: null
                                  nullable: true
                      current_max_mrsl_certification:
                        type: string
                        example: null
                        nullable: true
                      current_max_ctz_certification:
                        type: string
                        example: null
                        nullable: true
                      mrsl_certifications:
                        type: array
                        example: []
                      ctz_certifications:
                        type: array
                        example: []
                      assigned_at:
                        type: string
                        example: '2025-12-12T09:13:50.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-12T16:04:31.000000Z'
      tags:
        - 'Certification Bodies/V1'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  description: 'Decline reason. Must not be greater than 255 characters.'
                  example: 'Unable to process at this time.'
              required:
                - reason
    parameters:
      -
        in: path
        name: organisation_id
        description: 'The ID of the organisation.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: product_assignment_id
        description: 'The ID of the product assignment.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/certification-bodies/v1/{organisation_id}/product-assignment/bulk-decline':
    post:
      summary: 'Bulk-decline product assignments'
      operationId: bulkDeclineProductAssignments
      description: "Marks several assignments as declined in one request. Assignments that are already declined are skipped.\n\nThe response `data` is a summary object (counts and IDs), not a product-assignment API resource collection."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'All submitted IDs were eligible and are now declined.'
                    type: object
                    example:
                      message: 'Product assignments declined successfully'
                      data:
                        submitted_count: 2
                        declined_count: 2
                        declined_ids:
                          - 101
                          - 102
                        already_declined_count: 0
                        already_declined_ids: []
                    properties:
                      message:
                        type: string
                        example: 'Product assignments declined successfully'
                      data:
                        type: object
                        properties:
                          submitted_count:
                            type: integer
                            example: 2
                          declined_count:
                            type: integer
                            example: 2
                          declined_ids:
                            type: array
                            example:
                              - 101
                              - 102
                            items:
                              type: integer
                          already_declined_count:
                            type: integer
                            example: 0
                          already_declined_ids:
                            type: array
                            example: []
                  -
                    description: 'Some IDs were already declined; they are listed under `already_declined_ids` (same response shape).'
                    type: object
                    example:
                      message: 'Product assignments partially declined'
                      data:
                        submitted_count: 2
                        declined_count: 1
                        declined_ids:
                          - 101
                        already_declined_count: 1
                        already_declined_ids:
                          - 102
                    properties:
                      message:
                        type: string
                        example: 'Product assignments partially declined'
                      data:
                        type: object
                        properties:
                          submitted_count:
                            type: integer
                            example: 2
                          declined_count:
                            type: integer
                            example: 1
                          declined_ids:
                            type: array
                            example:
                              - 101
                            items:
                              type: integer
                          already_declined_count:
                            type: integer
                            example: 1
                          already_declined_ids:
                            type: array
                            example:
                              - 102
                            items:
                              type: integer
      tags:
        - 'Certification Bodies/V1'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                assignment_ids:
                  type: array
                  description: 'Single assignment ID (integer, distinct, must exist in the the database and be assigned to the requesting certification body).'
                  example:
                    - 101
                  items:
                    type: integer
                reason:
                  type: string
                  description: 'Shared decline reason for every assignment that changes state. Must not be greater than 255 characters.'
                  example: 'Unable to process at this time.'
              required:
                - assignment_ids
                - reason
    parameters:
      -
        in: path
        name: organisation_id
        description: 'The ID of the organisation.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/certification-bodies/v1/{organisation_id}/product-assignment/{product_assignment_id}/safety-data-sheet/{safetyDataSheet_id}':
    get:
      summary: 'Download a safety data sheet'
      operationId: downloadASafetyDataSheet
      description: 'Returns the SDS file for the chemical product linked to the given assignment.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: file
      tags:
        - 'Certification Bodies/V1'
    parameters:
      -
        in: path
        name: organisation_id
        description: 'The ID of the organisation.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: product_assignment_id
        description: 'The ID of the product assignment.'
        example: sint
        required: true
        schema:
          type: string
      -
        in: path
        name: safetyDataSheet_id
        description: 'The ID of the safetyDataSheet.'
        example: 1
        required: true
        schema:
          type: integer
