---
updatedAt: 2026-03-17T15:18:06.000Z
agentTools:
  projectIndex: https://developers.trendyol.com/v2.0/llms.txt
---

# Cancel Order Package Item (updatePackage)

### Cancel Order Package Item

You can use this method to cancel one or more item in Order Package.

* Each order package has a shipmentPackageId value. If one of the item is cancelled in the package, the package will be split automatically and new shipmentPackageId will be generated and assigned to the new package.

<div class="diagram-zoomable" tabindex="0">
  <DiagramDownload />
  ```mermaid
  flowchart LR

  A["Seller updates status to **Picking** (putUpdatePackage)"]
  B["Seller updates status to **Invoiced** (optional) (putUpdatePackage)"]
  C["Shipment is completed with existing **shipmentPackageId** and **cargoTrackingNumber** (getShipmentPackages)"]
  D{"Will it be cancelled due to out of stock? (**shipmentpackageId**)"}
  E["Package is created"]
  F["A cancellation request is made for the entire package (putUpdatePackage)"]
  G["Package status becomes **Cancelled**. You can see order via **getShipmentpackage** service or **Webhook** model (getShipmentPackages)"]
  H{"Will the entire order be cancelled? (**shipmentpackageId**)"}
  I["A partial cancellation request is made for the package (putUpdatePackage)"]
  J["The current shipment package id gets invalid and its status is updated to **Cancelled**"]
  K["New **shipmentpackageid** and **cargoTrackingNumber** are generated under the same **ordernumber** (getShipmentPackages)"]
  L["New package details are retrieved from **getShipmentPackage** service or checked via **Webhook** model (getShipmentPackages)"]

  D -->|NO| A
  D -->|YES| H
  I --> J
  J --> K
  K --> L
  F --> G
  E --> D
  A --> B
  B --> C
  H -->|YES| F
  H -->|NO| I
  L --> D

  classDef style0 fill:#ffe6cc,stroke:#d79b00,stroke-width:2px
  classDef style1 fill:#d5e8d4,stroke:#82b366,stroke-width:2px
  class A,B,C,E,F,G,I,J,K,L style0
  class D,H style1
  ```
</div>

### **PUT** updatePackage

<NoLinkCallout type="info" title="PROD">
  [https://apigw.trendyol.com/integration/order/sellers/\{sellerId}/shipment-packages/\{packageId}/items/unsupplied](https://apigw.trendyol.com/integration/order/sellers/\{sellerId}/shipment-packages/\{packageId}/items/unsupplied)
</NoLinkCallout>

<NoLinkCallout type="info" title="STAGE">
  [https://stageapigw.trendyol.com/integration/order/sellers/\{sellerId}/shipment-packages/\{packageId}/items/unsupplied](https://stageapigw.trendyol.com/integration/order/sellers/\{sellerId}/shipment-packages/\{packageId}/items/unsupplied)
</NoLinkCallout>

**Sample Service Request**

```json
{
 "lines": [
   {
     "lineId": 0,
     "quantity": 0
   }
 ],
"reasonId":0
 }
```

**Cancellation Reasons**

| reasonId | name                | description                                                                                                                      |
| :------- | :------------------ | :------------------------------------------------------------------------------------------------------------------------------- |
| 500      | Stock Out           | It should be selected if the product cannot be supplied due to out of stock and delay in shipping.                               |
| 501      | Defective Product   | If the product cannot be sent because it is defective, it should be selected.                                                    |
| 502      | Incorrect Price     | It should be selected in case of feeding the wrong price.                                                                        |
| 504      | Integration Problem | It should be selected in case of problems experienced in incorrect price or stock transfer due to the integration company.       |
| 505      | Bulk purchase       | It should be chosen if it is purchased from a single product and in bulk by the same customer after the discount on the product. |
| 506      | Force Majeure       | Natural disaster, illness, funeral, etc. should be chosen in cases                                                               |