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

# Replace Part



## OpenAPI

````yaml /openapi.json post /v1/workspaces/{workspaceId}/projects/{projectId}/items/{parentId}/parts/{linkId}/replace
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}/items/{parentId}/parts/{linkId}/replace:
    post:
      tags:
        - Project Item Parts
      summary: Replace Part
      operationId: ProjectItemPartsController_replacePart_v1
      parameters:
        - name: workspaceId
          required: true
          in: path
          schema:
            type: string
        - name: projectId
          required: true
          in: path
          schema:
            type: string
        - name: parentId
          required: true
          in: path
          schema:
            type: string
        - name: linkId
          required: true
          in: path
          schema:
            type: string
        - name: viaLinkId
          required: false
          in: query
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReplaceProjectItemPartDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddProjectItemPartResponseDto'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '409':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
components:
  schemas:
    ReplaceProjectItemPartDto:
      type: object
      properties:
        quantity:
          type: string
          pattern: ^\d{1,16}(?:\.\d{1,2})?$
        partProjectItemId:
          type: string
        expectedCatalogItemId:
          type: string
        catalogFamilyId:
          type: string
        catalogItemId:
          type: string
      required:
        - partProjectItemId
        - expectedCatalogItemId
        - catalogFamilyId
        - catalogItemId
    AddProjectItemPartResponseDto:
      type: object
      properties:
        row:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/ProjectItemPartResponseDto'
        id:
          type: string
        parentProjectItemId:
          type: string
        partProjectItemId:
          type: string
        quantity:
          type: string
        totalPriceOverride:
          type: string
          nullable: true
        createdAt:
          type: string
        affectedCatalogFamilyId:
          type: string
          nullable: true
      required:
        - row
        - id
        - parentProjectItemId
        - partProjectItemId
        - quantity
        - totalPriceOverride
        - createdAt
        - affectedCatalogFamilyId
    ErrorResponseDto:
      type: object
      properties:
        statusCode:
          type: number
          example: 409
        message:
          type: string
          example: Conflict
        code:
          type: string
          example: VARIANT_COMBO_TAKEN
          description: >-
            UPPER_SNAKE_CASE domain error code. Present on validation /
            business-rule errors; absent on generic HTTP errors.
        entity:
          type: string
          description: >-
            Entity type that caused the conflict (e.g. "ProjectItem"). Present
            when the error is entity-specific.
      required:
        - statusCode
        - message
    ProjectItemPartResponseDto:
      type: object
      properties:
        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
          nullable: true
        quantity:
          type: string
        createdAt:
          type: string
        partItemColumnsAttributes:
          type: object
          additionalProperties: true
        partItemVersion:
          type: number
        catalogFamilyStatus:
          type: string
        catalogFamilyDiscontinued:
          type: boolean
        partFamilyCategoryId:
          type: string
          nullable: true
        productTypeId:
          type: string
          nullable: true
        primaryItemSourceId:
          type: string
          nullable: true
        totalsStatus:
          enum:
            - unavailable
            - alternative
            - counted
          type: string
        parentQuantity:
          type: string
          nullable: true
        totalQuantity:
          type: string
          nullable: true
        calculatedTotalPrice:
          type: string
          nullable: true
        totalPriceOverride:
          type: string
          nullable: true
        totalPrice:
          type: string
          nullable: true
        totalPriceOverridable:
          type: boolean
      required:
        - id
        - parentProjectItemId
        - partProjectItemId
        - partProjectItemName
        - partCatalogFamilyId
        - partCatalogItemId
        - partItemIsBaseMaterial
        - partFamilyItemType
        - partCategoryName
        - primaryImageUrl
        - quantity
        - createdAt
        - partItemColumnsAttributes
        - partItemVersion
        - catalogFamilyStatus
        - catalogFamilyDiscontinued
        - partFamilyCategoryId
        - productTypeId
        - primaryItemSourceId
        - totalsStatus
        - parentQuantity
        - totalQuantity
        - calculatedTotalPrice
        - totalPriceOverride
        - totalPrice
        - totalPriceOverridable

````

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