> ## 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.

# Commit



## OpenAPI

````yaml /openapi.json post /v1/workspaces/{workspaceId}/projects/{projectId}/item-drafts/commit
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/commit:
    post:
      tags:
        - Item Magic Fill
      summary: Commit
      operationId: ItemMagicFillController_commit_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/CommitItemDraftDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemDraftCommitResponseDto'
components:
  schemas:
    CommitItemDraftDto:
      type: object
      properties:
        itemId:
          anyOf:
            - type: string
              pattern: ^[1-9]\d*$
            - type: 'null'
        version:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
            - type: 'null'
        name:
          type: string
          minLength: 1
          maxLength: 200
        categoryId:
          type: string
          pattern: ^[1-9]\d*$
        productTypeId:
          anyOf:
            - type: string
              pattern: ^[1-9]\d*$
            - type: 'null'
        columnsAttributes:
          type: object
          propertyNames:
            type: string
            minLength: 1
            maxLength: 200
          additionalProperties:
            $ref: '#/components/schemas/CommitItemDraftDto__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)$
        guidance:
          maxItems: 40
          type: array
          items:
            type: object
            properties:
              kind:
                enum:
                  - instruction
                  - requirement
                type: string
              text:
                type: string
                minLength: 1
                maxLength: 1000
              assigneeRoleGroupIds:
                maxItems: 5
                type: array
                items:
                  type: string
                  enum:
                    - mfg_vendors
                    - owners
                    - gc_sub
                    - warehouse
                    - facility_mgr
            required:
              - kind
              - text
              - assigneeRoleGroupIds
            additionalProperties: false
        guidanceRevision:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        coreDecision:
          type: string
          enum:
            - save_in_project
            - create_alternative
        alternativeName:
          type: string
          minLength: 1
          maxLength: 200
        creationDetails:
          type: object
          properties:
            images:
              type: array
              items:
                type: object
                properties:
                  url:
                    type: string
                    format: uri
                  filename:
                    type: string
                    minLength: 1
                    maxLength: 255
                required:
                  - url
                  - filename
                additionalProperties: false
            manufacturerCompanyId:
              anyOf:
                - type: string
                  pattern: ^[1-9]\d*$
                - type: 'null'
            source:
              anyOf:
                - type: object
                  properties:
                    companyId:
                      type: string
                      pattern: ^[1-9]\d*$
                    officeId:
                      anyOf:
                        - type: string
                          pattern: ^[1-9]\d*$
                        - type: 'null'
                  required:
                    - companyId
                    - officeId
                  additionalProperties: false
                - type: 'null'
            sourceAttributes:
              type: object
              propertyNames:
                type: string
                minLength: 1
                maxLength: 200
              additionalProperties:
                $ref: '#/components/schemas/CommitItemDraftDto__schema0'
          required:
            - images
            - manufacturerCompanyId
            - source
            - sourceAttributes
          additionalProperties: false
        initialArea:
          type: object
          properties:
            areaId:
              type: string
              pattern: ^[1-9]\d*$
            structureVersion:
              type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
            quantity:
              type: string
              pattern: ^\d{1,16}(\.\d{1,2})?$
          required:
            - areaId
            - structureVersion
            - quantity
          additionalProperties: false
      required:
        - itemId
        - version
        - name
        - categoryId
        - productTypeId
        - columnsAttributes
        - requestKey
        - guidance
      additionalProperties: false
    ItemDraftCommitResponseDto:
      type: object
      properties:
        item:
          $ref: '#/components/schemas/ProjectItemResponseDto'
        slotId:
          type: string
      required:
        - item
        - slotId
    CommitItemDraftDto__schema0:
      anyOf:
        - type: string
        - type: number
        - type: boolean
        - type: 'null'
        - type: array
          items:
            $ref: '#/components/schemas/CommitItemDraftDto__schema0'
        - type: object
          propertyNames:
            type: string
          additionalProperties:
            $ref: '#/components/schemas/CommitItemDraftDto__schema0'
    ProjectItemResponseDto:
      type: object
      properties:
        id:
          type: string
        projectId:
          type: string
        projectItemSlotId:
          type: string
          nullable: true
        name:
          type: string
        catalogFamilyId:
          type: string
          description: BigInt string
        catalogItemId:
          type: string
          description: BigInt string
        materialFinish:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/ProjectItemMaterialFinishDto'
        catalogFamilySourceId:
          type: string
          nullable: true
        columnsAttributes:
          type: object
          additionalProperties: true
        sourceMeta:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/ProjectItemSourceMetaDto'
        instructionLinks:
          type: array
          items:
            $ref: '#/components/schemas/ProjectItemInstructionLinkResponseDto'
        syncStateCache:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/SyncStateCacheDto'
        isPrimary:
          type: boolean
        catalogConnectionMode:
          enum:
            - live
            - saved
          type: string
          description: >-
            live participates in catalog synchronization; saved is a
            project-only saved catalog version
        savedAt:
          format: date-time
          type: string
          nullable: true
        selectedSource:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/SelectedSourceDto'
        collectionApplication:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/CollectionApplicationProvenanceDto'
        categoryId:
          type: string
        productTypeId:
          type: string
          nullable: true
        kind:
          enum:
            - option
            - component
          type: string
        catalogFamilyStatus:
          nullable: true
          enum:
            - draft
            - new_from_project
            - new_from_collection
            - ready_to_use
          type: string
          description: CatalogFamily.status — drives FE Push/Pull button visibility
        catalogFamilyItemType:
          nullable: true
          enum:
            - default
            - material
            - template
          type: string
          description: CatalogFamily.itemType for the linked live Catalog family
        affectedCatalogFamilyId:
          type: string
          nullable: true
        catalogDecisionEventIds:
          type: array
          items:
            type: string
        brandStandardId:
          type: string
          nullable: true
        refNumber:
          type: string
          nullable: true
        affectedParentPiIds:
          type: array
          items:
            type: string
          description: >-
            Parent PI ids whose parts list embeds this PI as a row. Set only
            when the mutated PI is a component; FE invalidates each parent PI
            parts-list cache entry. Empty array for options.
        version:
          type: number
        createdAt:
          type: string
        updatedAt:
          type: string
        slotColumnsAttributes:
          type: object
          nullable: true
          additionalProperties: true
        coreChangePolicy:
          type: object
      required:
        - id
        - projectId
        - projectItemSlotId
        - name
        - catalogFamilyId
        - catalogItemId
        - materialFinish
        - columnsAttributes
        - sourceMeta
        - instructionLinks
        - isPrimary
        - catalogConnectionMode
        - savedAt
        - selectedSource
        - collectionApplication
        - categoryId
        - productTypeId
        - kind
        - catalogFamilyStatus
        - catalogFamilyItemType
        - catalogDecisionEventIds
        - brandStandardId
        - refNumber
        - affectedParentPiIds
        - version
        - createdAt
        - updatedAt
        - slotColumnsAttributes
        - coreChangePolicy
    ProjectItemMaterialFinishDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        isBaseMaterial:
          type: boolean
      required:
        - id
        - name
        - isBaseMaterial
    ProjectItemSourceMetaDto:
      type: object
      properties:
        selectors:
          type: object
          additionalProperties:
            type: string
          description: Column slug → CSS selector of the clipped page element.
        url:
          type: string
          maxLength: 2048
          format: uri
        title:
          type: string
          maxLength: 512
        favicon:
          type: string
          maxLength: 2048
        ogImage:
          type: string
          maxLength: 2048
        clippedAt:
          type: string
      required:
        - url
    ProjectItemInstructionLinkResponseDto:
      type: object
      properties:
        assigneeRoleGroupIds:
          type: array
          items:
            type: string
            enum:
              - mfg_vendors
              - owners
              - gc_sub
              - warehouse
              - facility_mgr
        id:
          type: string
        kind:
          enum:
            - instruction
            - requirement
          type: string
        text:
          type: string
        position:
          type: number
      required:
        - assigneeRoleGroupIds
        - id
        - kind
        - text
        - position
    SyncStateCacheDto:
      type: object
      properties:
        hasDiff:
          type: boolean
          description: >-
            Status-worthy drift: core/commercial columns, taxonomy, invalid
            source binding, or parts; descriptive-only column changes are
            excluded
        columnsDiff:
          type: boolean
          description: >-
            Any physical catalog-owned column delta, including descriptive
            fields; this can be true while hasDiff is false
        partsDiff:
          $ref: '#/components/schemas/PartsDiffDto'
        selectionDiff:
          $ref: '#/components/schemas/SelectionDiffDto'
        orphanedRefs:
          $ref: '#/components/schemas/OrphanedRefsDto'
        computedAt:
          type: string
        componentsDiverged:
          type: boolean
      required:
        - hasDiff
        - columnsDiff
        - partsDiff
        - selectionDiff
        - orphanedRefs
        - computedAt
        - componentsDiverged
    SelectedSourceDto:
      type: object
      properties:
        isDefault:
          type: boolean
        companyName:
          type: object
          nullable: true
        officeName:
          type: object
          nullable: true
      required:
        - isDefault
        - companyName
        - officeName
    CollectionApplicationProvenanceDto:
      type: object
      properties:
        collection:
          $ref: '#/components/schemas/CollectionApplicationCollectionProvenanceDto'
        entry:
          $ref: '#/components/schemas/CollectionApplicationEntryProvenanceDto'
        reference:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/CollectionApplicationReferenceProvenanceDto'
        application:
          $ref: '#/components/schemas/CollectionApplicationIdentityProvenanceDto'
        content:
          $ref: '#/components/schemas/CollectionApplicationContentProvenanceDto'
        governance:
          $ref: '#/components/schemas/CollectionApplicationGovernanceProvenanceDto'
      required:
        - collection
        - entry
        - reference
        - application
        - content
        - governance
    PartsDiffDto:
      type: object
      properties:
        hasDiff:
          type: boolean
        addedLocally:
          type: array
          items:
            type: string
        removedLocally:
          type: array
          items:
            type: string
        quantityChanged:
          type: array
          items:
            $ref: '#/components/schemas/PartsDiffEntryDto'
      required:
        - hasDiff
        - addedLocally
        - removedLocally
        - quantityChanged
    SelectionDiffDto:
      type: object
      properties:
        familySourceMismatch:
          type: boolean
          description: true when the selected family-source binding is incomplete
        itemSourceMismatch:
          type: boolean
          description: true when the selected item-source binding is incomplete
      required:
        - familySourceMismatch
        - itemSourceMismatch
    OrphanedRefsDto:
      type: object
      properties:
        family:
          type: boolean
        item:
          type: boolean
        familySource:
          type: boolean
        itemSource:
          type: boolean
      required:
        - family
        - item
        - familySource
        - itemSource
    CollectionApplicationCollectionProvenanceDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        brand:
          type: string
        region:
          type: string
        generation:
          type: number
        version:
          type: number
        navigable:
          type: boolean
      required:
        - id
        - name
        - brand
        - region
        - generation
        - version
        - navigable
    CollectionApplicationEntryProvenanceDto:
      type: object
      properties:
        id:
          type: string
        label:
          type: string
        productTypeLabel:
          type: string
      required:
        - id
        - label
        - productTypeLabel
    CollectionApplicationReferenceProvenanceDto:
      type: object
      properties:
        label:
          type: string
        kind:
          type: string
          enum:
            - catalog_item
            - spec_template
        referenceCode:
          type: string
          nullable: true
      required:
        - label
        - kind
        - referenceCode
    CollectionApplicationIdentityProvenanceDto:
      type: object
      properties:
        id:
          type: string
        createdAt:
          type: string
      required:
        - id
        - createdAt
    CollectionApplicationContentProvenanceDto:
      type: object
      properties:
        description:
          type: string
          nullable: true
        notes:
          type: array
          items:
            type: string
      required:
        - description
        - notes
    CollectionApplicationGovernanceProvenanceDto:
      type: object
      properties:
        mandatoryItem:
          type: boolean
        designReviewRequired:
          type: boolean
        optionalManufacturerNames:
          type: array
          items:
            type: string
      required:
        - mandatoryItem
        - designReviewRequired
        - optionalManufacturerNames
    PartsDiffEntryDto:
      type: object
      properties:
        catalogItemId:
          type: string
        projectQty:
          type: string
          nullable: true
        catalogQty:
          type: string
          nullable: true
      required:
        - catalogItemId
        - projectQty
        - catalogQty

````