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

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

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

## Request body

- object
  - `nodeId` string, required
  - `meta` object, required
    - `orderId` string, required
    - `type` 'PURCHASE_ORDER' | 'SALES_ORDER' | 'purchase_order' | 'sales_order' | 'purchase' | 'sales', required
    - `attachmentTemplateId` string
    - `traceType` string
  - `orderNumber` string, required
  - `buyer` object
    - `id` string, required
    - `facilityProcesses` string[], required
  - `supplier` object, required
    - `id` string, required
    - `facilityProcesses` string[], required
  - `receiver` object, nullable
    - `id` string, required
    - `facilityProcesses` string[], required
  - `attachmentTemplateId` string, nullable
  - `orderTypeId` string, nullable
  - `orderTags` string[]
  - `lines` object[], required
    - `styleId` string, required
    - `quantity` number, required
    - `unit` string, required
    - `secondaryQuantity` number, nullable
    - `secondaryUnit` string
  - `attachments` object[], required
    - `id` string, nullable
    - `fileId` string, required
    - `type` string, required
    - `name` string
    - `reference` string
    - `description` string
    - `fileUrl` string
  - `responsibleUserIds` string[], nullable
  - `responsibleUserEmails` string[], nullable
  - `orderDate` unknown
  - `agreedDeliveryDate` unknown
  - `deliveryDate` unknown

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

> 22 revisions in range; 1 not diffed.

- **2026-08-31** `97e51f27dc77` — 20 breaking, 1 warning, 57 info
  - added the new required request property `receiver/facilityProcesses`
  - added the new required request property `receiver/id`
  - removed `subschema #1, subschema #2` from the `agreedDeliveryDate` request property `anyOf` list
  - removed `subschema #1, subschema #2` from the `deliveryDate` request property `anyOf` list
  - …74 more

[Change history](https://skmtc.dev/retraced/apis/api-reference/changes/api/cascade-tracing/transactions/attach-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/97e51f27dc77/schema)
