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

## Other responses

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

## Changes

> 23 revisions in range; 1 not diffed.

- **2026-08-31** `97e51f27dc77` — 6 breaking, 46 info
  - the response property `data/layers` became nullable for the status `200`
  - the response property `data/links` became nullable for the status `200`
  - the response property `data/meta` became nullable for the status `200`
  - the response property `data/order` became nullable for the status `200`
  - …48 more

[Change history](https://skmtc.dev/retraced/apis/api-reference/changes/api/cascade-tracing/transactions/attach-existing-order/post.md)

---

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