---
title: "POST /api/cascade-tracing/transactions/attach-existing-order"
method: POST
path: "/api/cascade-tracing/transactions/attach-existing-order"
tags: ["OrderTracing - Transactions"]
---

# POST /api/cascade-tracing/transactions/attach-existing-order

`POST /api/cascade-tracing/transactions/attach-existing-order`

## Request body

- object
  - `nodeId` string, required
  - `purchaseOrderId` string, required
  - `meta` object, required
    - `orderId` string, required
    - `type` string, required

## Response `200`

Default Response

- object
  - `metadata` object, required
    - `success` boolean, required — True when the request succeeded.
  - `data` object, required
    - `layers` object[]
      - `id` union, required
        - string
        - number
      - `position` number
      - `productionProcess` union
        - string
        - object
          - `id` string, required
          - `name` string
          - `position` number
      - `nodes` object[]
        - `id` string, required
        - `assetCountry` string
        - `assetId` string
        - `assetType` string
        - `facilityProcesses` union[]
          - union
            - string
            - object
              - …
        - `featuredFacilityProcess` union
          - string
          - object
            - `id` string, required
            - `name` string
            - `position` number
        - `productionProcess` union
          - string
          - object
            - `id` string, required
            - `name` string
            - `position` number
        - `hasSupplier` boolean
        - `canTransformProduct` boolean
        - `producingProducts` object[]
          - `id` string, required
          - `name` string
          - `sku` string
          - `unit` string
          - `quantity` number
          - `lineId` string
    - `links` object[]
      - `id` string, required
      - `originTracingNodeId` string
      - `destinationTracingNodeId` string
      - `isOriginCountry` union
        - boolean
        - number
      - `isInternal` union
        - boolean
        - number
      - `isConnected` union
        - boolean
        - number
    - `meta` object
      - `orderId` string
      - `type` string
      - `attachmentTemplateId` string
      - `traceType` string
      - `order` object
        - `id` string, required
        - `deliveryDate` string, date-time
        - `orderType` string
        - `tracingOrderTags` unknown
        - `orderNumber` string
        - `orderDate` string, date-time
        - `tracingOrderId` string
        - `companyId` string
        - `originTracingNodeId` string
        - `destinationTracingNodeId` string
        - `receiverTracingNodeId` string
        - `status` string
        - `agreedDeliveryDate` string, date-time
        - `tracingSalesOrderNumber` string
        - `buyerCompanyId` string
        - `supplierCompanyId` string
        - `receiverCompanyId` string
        - `tracingAttachmentTemplateId` string
        - `scDocCompletionPercentage` number
        - `docCompletionPercentage` number
        - `lastProductionProcessId` string
        - `totalUploadedDocumentTypes` number
        - `totalRequiredDocumentTypes` number
        - `lastProductionProcessName` string
        - `isInternal` union
          - boolean
          - number
        - `color` string
        - `depthLevel` number
        - `attachmentTemplate` object
          - `id` string, required
          - `name` string
          - `tracingType` string
          - `description` string
          - `companyId` string
          - `isActive` union
            - boolean
            - number
        - `lines` unknown[]
          - unknown
        - `salesOrder` object
          - `id` string, required
          - `orderNumber` string
          - `orderDate` string, date-time
          - `deliveryDate` string, date-time
          - `buyerCompanyId` string
          - `supplierCompanyId` string
          - `receiverCompanyId` string
          - `tracingOrderId` string
          - `companyId` string
          - `originTracingNodeId` string
          - `destinationTracingNodeId` string
          - `receiverTracingNodeId` string
          - `status` string
          - `agreedDeliveryDate` string, date-time
          - `tracingPurchaseOrderNumber` string
        - `linkedSalesOrders` object[]
          - `id` string, required
          - `destinationTracingNodeId` string
          - `originTracingNodeId` string
          - `receiverTracingNodeId` string
          - `tracingSalesOrderId` string
          - `tracingPurchaseOrderId` string
          - `isInternal` union
            - boolean
            - number
          - `buyerCompanyId` string
          - `supplierCompanyId` string
          - `receiverCompanyId` string
        - `buyerCompany` object
          - `id` string, required
          - `name` string
          - `officialName` string
          - `country` string
          - `countryName` string
          - `facilityProcesses` union
            - string
            - unknown[]
              - …
        - `supplierCompany` object
          - `id` string, required
          - `name` string
          - `officialName` string
          - `country` string
          - `countryName` string
          - `facilityProcesses` union
            - string
            - unknown[]
              - …
        - `receiverCompany` object
          - `id` string, required
          - `name` string
          - `officialName` string
          - `country` string
          - `countryName` string
          - `facilityProcesses` union
            - string
            - unknown[]
              - …
        - `purchaseOrderResponsibleUsers` unknown[]
          - unknown
        - `salesOrderResponsibleUsers` unknown[]
          - unknown
        - `aiSummary` unknown
    - `order` object
      - `id` string, required
      - `deliveryDate` string, date-time
      - `orderType` string
      - `tracingOrderTags` unknown
      - `orderNumber` string
      - `orderDate` string, date-time
      - `tracingOrderId` string
      - `companyId` string
      - `originTracingNodeId` string
      - `destinationTracingNodeId` string
      - `receiverTracingNodeId` string
      - `status` string
      - `agreedDeliveryDate` string, date-time
      - `tracingSalesOrderNumber` string
      - `buyerCompanyId` string
      - `supplierCompanyId` string
      - `receiverCompanyId` string
      - `tracingAttachmentTemplateId` string
      - `scDocCompletionPercentage` number
      - `docCompletionPercentage` number
      - `lastProductionProcessId` string
      - `totalUploadedDocumentTypes` number
      - `totalRequiredDocumentTypes` number
      - `lastProductionProcessName` string
      - `isInternal` union
        - boolean
        - number
      - `color` string
      - `depthLevel` number
      - `attachmentTemplate` object
        - `id` string, required
        - `name` string
        - `tracingType` string
        - `description` string
        - `companyId` string
        - `isActive` union
          - boolean
          - number
      - `lines` unknown[]
        - unknown
      - `salesOrder` object
        - `id` string, required
        - `orderNumber` string
        - `orderDate` string, date-time
        - `deliveryDate` string, date-time
        - `buyerCompanyId` string
        - `supplierCompanyId` string
        - `receiverCompanyId` string
        - `tracingOrderId` string
        - `companyId` string
        - `originTracingNodeId` string
        - `destinationTracingNodeId` string
        - `receiverTracingNodeId` string
        - `status` string
        - `agreedDeliveryDate` string, date-time
        - `tracingPurchaseOrderNumber` string
      - `linkedSalesOrders` object[]
        - `id` string, required
        - `destinationTracingNodeId` string
        - `originTracingNodeId` string
        - `receiverTracingNodeId` string
        - `tracingSalesOrderId` string
        - `tracingPurchaseOrderId` string
        - `isInternal` union
          - boolean
          - number
        - `buyerCompanyId` string
        - `supplierCompanyId` string
        - `receiverCompanyId` string
      - `buyerCompany` object
        - `id` string, required
        - `name` string
        - `officialName` string
        - `country` string
        - `countryName` string
        - `facilityProcesses` union
          - string
          - unknown[]
            - unknown
      - `supplierCompany` object
        - `id` string, required
        - `name` string
        - `officialName` string
        - `country` string
        - `countryName` string
        - `facilityProcesses` union
          - string
          - unknown[]
            - unknown
      - `receiverCompany` object
        - `id` string, required
        - `name` string
        - `officialName` string
        - `country` string
        - `countryName` string
        - `facilityProcesses` union
          - string
          - unknown[]
            - unknown
      - `purchaseOrderResponsibleUsers` unknown[]
        - unknown
      - `salesOrderResponsibleUsers` unknown[]
        - unknown
      - `aiSummary` unknown

## Other responses

- `400` — Default Response
- `401` — Default Response
- `403` — Default Response
- `404` — Default Response

---

[API](https://skmtc.net/retraced/apis/api-reference.md) · [All operations](https://skmtc.net/retraced/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/retraced/api-reference/revisions/60d6c901bc4e/schema)
