> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.specurate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Component



## OpenAPI

````yaml /openapi.json post /v1/workspaces/{workspaceId}/projects/{projectId}/item-drafts/components
openapi: 3.1.0
info:
  title: Specurate API
  description: ''
  version: 1.0.0
  contact: {}
servers:
  - url: https://app.specurate.com/api
    description: API Server
security: []
tags: []
paths:
  /v1/workspaces/{workspaceId}/projects/{projectId}/item-drafts/components:
    post:
      tags:
        - Item Magic Fill
      summary: Add Component
      operationId: ItemMagicFillController_addComponent_v1
      parameters:
        - name: workspaceId
          required: true
          in: path
          schema:
            type: string
            pattern: ^[1-9]\d*$
        - name: projectId
          required: true
          in: path
          schema:
            type: string
            pattern: ^[1-9]\d*$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddItemDraftComponentDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddProjectItemPartResponseDto'
components:
  schemas:
    AddItemDraftComponentDto:
      type: object
      properties:
        productTypeId:
          type: string
          pattern: ^[1-9]\d*$
        location:
          anyOf:
            - type: string
              minLength: 1
              maxLength: 255
            - type: 'null'
        quantity:
          type: string
          pattern: ^(?!0+(?:\.0{1,6})?$)\d{1,16}(?:\.\d{1,6})?$
        name:
          type: string
          minLength: 1
          maxLength: 200
        itemType:
          type: string
          enum:
            - default
            - material
        columnsAttributes:
          type: object
          propertyNames:
            type: string
            minLength: 1
            maxLength: 200
          additionalProperties:
            $ref: '#/components/schemas/__schema0'
        requestKey:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        parentItemId:
          type: string
          pattern: ^[1-9]\d*$
      required:
        - productTypeId
        - quantity
        - requestKey
        - parentItemId
      additionalProperties: false
    AddProjectItemPartResponseDto:
      type: object
      properties:
        row:
          anyOf:
            - $ref: '#/components/schemas/ProjectItemPartResponseDto'
            - type: 'null'
        id:
          type: string
        parentProjectItemId:
          type: string
        partProjectItemId:
          type: string
        quantity:
          type: string
        location:
          type:
            - string
            - 'null'
        totalPriceOverride:
          type:
            - string
            - 'null'
        createdAt:
          type: string
        affectedCatalogFamilyId:
          type:
            - string
            - 'null'
      required:
        - row
        - id
        - parentProjectItemId
        - partProjectItemId
        - quantity
        - location
        - createdAt
        - affectedCatalogFamilyId
    __schema0:
      anyOf:
        - type: string
        - type: number
        - type: boolean
        - type: 'null'
        - type: array
          items:
            $ref: '#/components/schemas/__schema0'
        - type: object
          propertyNames:
            type: string
          additionalProperties:
            $ref: '#/components/schemas/__schema0'
    ProjectItemPartResponseDto:
      type: object
      properties:
        manufacturer:
          anyOf:
            - $ref: '#/components/schemas/CatalogManufacturerResponseDto'
            - type: 'null'
        id:
          type: string
        parentProjectItemId:
          type: string
        partProjectItemId:
          type: string
        partProjectItemName:
          type: string
        partCatalogFamilyId:
          type: string
        partCatalogItemId:
          type: string
        partItemIsBaseMaterial:
          type: boolean
        partFamilyItemType:
          type: string
          enum:
            - default
            - material
        partCategoryName:
          type: string
        primaryImageUrl:
          type:
            - string
            - 'null'
        quantity:
          type: string
        location:
          type:
            - string
            - 'null'
        createdAt:
          type: string
        partItemColumnsAttributes:
          type: object
          additionalProperties: true
        partItemVersion:
          type: number
        catalogFamilyStatus:
          type: string
        catalogFamilyDiscontinued:
          type: boolean
        partFamilyCategoryId:
          type:
            - string
            - 'null'
        productTypeId:
          type:
            - string
            - 'null'
        primaryItemSourceId:
          type:
            - string
            - 'null'
        totalsStatus:
          enum:
            - unavailable
            - alternative
            - counted
          type: string
        parentQuantity:
          type:
            - string
            - 'null'
        totalQuantity:
          type:
            - string
            - 'null'
        calculatedTotalPrice:
          type:
            - string
            - 'null'
        totalPriceOverride:
          type:
            - string
            - 'null'
        totalPrice:
          type:
            - string
            - 'null'
        totalPriceOverridable:
          type: boolean
      required:
        - manufacturer
        - id
        - parentProjectItemId
        - partProjectItemId
        - partProjectItemName
        - partCatalogFamilyId
        - partCatalogItemId
        - partItemIsBaseMaterial
        - partFamilyItemType
        - partCategoryName
        - primaryImageUrl
        - quantity
        - location
        - createdAt
        - partItemColumnsAttributes
        - partItemVersion
        - catalogFamilyStatus
        - catalogFamilyDiscontinued
        - partFamilyCategoryId
        - productTypeId
        - primaryItemSourceId
        - totalsStatus
        - parentQuantity
        - totalQuantity
        - totalPriceOverridable
    CatalogManufacturerResponseDto:
      type: object
      properties:
        identity:
          $ref: '#/components/schemas/CompanyIdentityResponseDto'
        id:
          type: string
        name:
          type: string
        available:
          type: boolean
      required:
        - id
        - name
        - available
    CompanyIdentityResponseDto:
      type: object
      properties:
        globalCompany:
          anyOf:
            - $ref: '#/components/schemas/GlobalCompanyResponseDto'
            - type: 'null'
        version:
          type:
            - number
            - 'null'
        suggestion:
          anyOf:
            - $ref: '#/components/schemas/CompanyIdentitySuggestionDto'
            - type: 'null'
      required:
        - globalCompany
        - version
    GlobalCompanyResponseDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        primaryType:
          type: string
          enum:
            - brand
            - rep
            - dealer
            - distributor
        legalName:
          type:
            - string
            - 'null'
        country:
          type:
            - string
            - 'null'
        aliases:
          type: array
          items:
            type: string
        domains:
          type: array
          items:
            type: string
        retiredAt:
          type:
            - string
            - 'null'
      required:
        - id
        - name
        - primaryType
        - legalName
        - country
        - aliases
        - domains
        - retiredAt
    CompanyIdentitySuggestionDto:
      type: object
      properties:
        candidates:
          type: array
          items:
            $ref: '#/components/schemas/CompanyIdentityCandidateResponseDto'
        expectedVersion:
          type:
            - number
            - 'null'
        evidenceFingerprint:
          type: string
      required:
        - candidates
        - expectedVersion
        - evidenceFingerprint
    CompanyIdentityCandidateResponseDto:
      type: object
      properties:
        company:
          $ref: '#/components/schemas/GlobalCompanyResponseDto'
        nameMatch:
          type: boolean
        matchingHosts:
          type: array
          items:
            type: string
        typeMatch:
          type: boolean
      required:
        - company
        - nameMatch
        - matchingHosts
        - typeMatch

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.