6. Cancel Package
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.
- If you would like to keep the package status same, "shouldKeepPreviousStatus field should be marked as "true", otherwise (if you send this field "false") new packages will be generated on "created" status.
- The default value of "shouldKeepPreviousStatus" is "false". If you do not send this field, it will be marked as "false"
- You need to send "storeFrontCode" as Header Parameter.
flowchart LR
A["Cancellation request is made for the entire package (putUpdatePackage)"]
B["Package status becomes **Cancelled**. Seller can see the cancelled order via **getShipmentpackages** service or **Webhook** model (getShipmentPackages)"]
C{"Will the entire order be cancelled? (**shipmentPackageId**)"}
D["Partial cancellation request is made (putUpdatePackage)"]
E["The current shipment package id gets invalid and its status is updated to **Cancelled**"]
F["New **shipmentPackageId** and **cargoTrackingNumber** are generated under the same **orderNumber** (getShipmentPackages)"]
G["New package details are retrieved from **getShipmentPackages** service or **Webhook** model (getShipmentPackages)"]
H{"What is cargo carrier agreement? **Trendyol Pays** or **Seller Pays**?"}
I["Cancellation request is made for the entire package (putUpdatePackage)"]
J["Package status becomes **Cancelled**. Seller can see the cancelled order via **getShipmentpackages** service or **Webhook** mdodel (getShipmentPackages)"]
K["Seller can receive package status updates via **getShipmentPackages** service or **Webhook** model. (getShipmentPackages)"]
L{"Will the entire order be cancelled? (**shipmentPackageId**)"}
M["Partial cancellation request is made (putUpdatetPackage)"]
N["The current shipment package id gets invalid and its status is updated to **Cancelled**"]
O["New **shipmentPackageId** is generated under the same **orderNumber** (getShipmentPackages)"]
P["Seller sends **cargoSenderNumber** and cargo **providerCode** for the new shipmentPackageIds (putUpdateTrackingNumber)"]
M --> N
N --> O
O --> P
I --> J
J --> K
L -->|NO| M
L -->|YES| I
H -->|Seller Pays| L
D --> E
E --> F
F --> G
A --> B
B --> K
C -->|YES| A
C -->|NO| D
G --> K
H -->|Trendyol Pays| C
P --> K
classDef style0 fill:#ffe6cc,stroke:#d79b00,stroke-width:2px
classDef style1 fill:#d5e8d4,stroke:#82b366,stroke-width:2px
class A,B,D,E,F,G,I,J,K,M,N,O,P style0
class C,H,L style1PUT updatePackage
Sample Service Request
{
"lines": [
{
"lineId": 0,
"quantity": 0
}
],
"reasonId":0,
"shouldKeepPreviousStatus": true
}Cancellation Reasons
| reasonId | name | description |
|---|---|---|
| 500 | Stock Out | It should be selected if the product cannot be supplied due to reasons such as out of stock and shipping delays. |
| 501 | Faulty/damaged product | It should be selected if the product cannot be sent because it is defective/defective/broken. |
| 502 | Wrong price | It should be selected in case the wrong price is fed. |
| 503 | Incorrect image/barcode/quantity | It should be selected in case there are different products defined with the same barcode in the Trendyol system, the product is listed with an incorrect image, the product information contains incorrect content (a 2-pack product is sold with a single product barcode, etc.). |
| 504 | Integration error | It should be selected in case of incorrect prices or problems in stock transfer due to the integration company. |
| 505 | Bulk purchase | It should be selected if a single product is purchased in bulk by the same customer after the discount on the product. |
| 506 | Force majeure | Natural disaster, illness, funeral, etc. should be selected in such cases. |
Updated 5 days ago