Discount Representations in the Get Shipment Packages Service
Understanding Order Discounts
Discount fields in the getShipmentPackages service — which discounts are seller-funded, which are Trendyol-funded, and how to read them.
Key Rule:
lineItemSellerDiscountrepresents the discount covered by the seller, whilelineItemTyDiscountrepresents the discount covered by Trendyol. The two are completely independent.Net unit price:
lineItemPrice = lineGrossAmount − lineItemSellerDiscount − lineItemTyDiscount
Field Hierarchy
Package Level
Summarizes the entire order.
| Field | Description |
|---|---|
packageGrossAmount | Total gross amount (before discounts) |
packageSellerDiscount | Total seller discount |
packageTyDiscount | Total Trendyol discount * |
packageTotalDiscount | Total discount (Seller + TY) |
packageTotalPrice | Net amount payable |
discountDisplays[] | Campaign names and discount amounts |
* packageTyDiscount may be populated only for commercial=true (B2B) orders.
Line Level — lines[]
lines[]Per-product unit totals.
| Field | Description |
|---|---|
lineGrossAmount | Unit gross price (before discounts) |
lineSellerDiscount | Seller discount (sum of items) |
lineTyDiscount | TY discount (sum of items) |
lineTotalDiscount | Total unit discount |
lineUnitPrice | Net unit price |
Item Level — discountDetails[]
discountDetails[]Separate discount entry per unit. For a line with quantity=N, discountDetails returns an array of N elements.
| Field | Description |
|---|---|
lineItemPrice | Net price = Gross − Seller − TY |
lineItemSellerDiscount | Seller discount applied to this item |
lineItemTyDiscount | Trendyol discount applied to this item |
Scenario Examples
1. No Discount (Baseline)
A standard order with no discounts applied. All discount fields are zero and discountDisplays returns an empty array.
{
"packageGrossAmount": 498.90,
"packageSellerDiscount": 0.00,
"packageTyDiscount": 0.00,
"packageTotalDiscount": 0.00,
"packageTotalPrice": 498.90,
"discountDisplays": [],
"lines": [
{
"lineGrossAmount": 498.90,
"lineSellerDiscount": 0.00,
"lineTyDiscount": 0.00,
"lineTotalDiscount": 0.00,
"lineUnitPrice": 498.90,
"discountDetails": [
{
"lineItemPrice": 498.90,
"lineItemSellerDiscount": 0.00,
"lineItemTyDiscount": 0.00
}
]
}
]
}2. Seller Discount ("15% Off Orders Over 350 TL")
A campaign defined by the seller via the Trendyol Seller Panel. The 52.50 TL discount is funded by the seller.
{
"packageGrossAmount": 350.00,
"packageSellerDiscount": 52.50,
"packageTyDiscount": 0.00,
"packageTotalDiscount": 52.50,
"packageTotalPrice": 297.50,
"discountDisplays": [
{
"displayName": "15% Off Orders Over 350 TL",
"discountAmount": 52.50
}
],
"lines": [
{
"lineGrossAmount": 350.00,
"lineSellerDiscount": 52.50,
"lineTyDiscount": 0.00,
"lineTotalDiscount": 52.50,
"lineUnitPrice": 297.50,
"discountDetails": [
{
"lineItemPrice": 297.50,
"lineItemSellerDiscount": 52.50,
"lineItemTyDiscount": 0.00
}
]
}
]
}3. Trendyol Coupon
A Trendyol coupon applied by the customer at checkout. The discount is funded by Trendyol and does not affect the seller's revenue.
{
"packageGrossAmount": 500.00,
"packageSellerDiscount": 0.00,
"packageTyDiscount": 75.00,
"packageTotalDiscount": 75.00,
"packageTotalPrice": 425.00,
"discountDisplays": [
{
"displayName": "75 TL Coupon",
"discountAmount": 75.00
}
],
"lines": [
{
"lineGrossAmount": 500.00,
"lineSellerDiscount": 0.00,
"lineTyDiscount": 75.00,
"lineTotalDiscount": 75.00,
"lineUnitPrice": 425.00,
"discountDetails": [
{
"lineItemPrice": 425.00,
"lineItemSellerDiscount": 0.00,
"lineItemTyDiscount": 75.00
}
]
}
]
}4. Trendyol Campaign (Flash Sale / Deals)
A platform-wide campaign organized by Trendyol such as Flash Sale, Deals, or "20% Off in Cart". The full discount is funded by Trendyol.
{
"packageGrossAmount": 800.00,
"packageSellerDiscount": 0.00,
"packageTyDiscount": 160.00,
"packageTotalDiscount": 160.00,
"packageTotalPrice": 640.00,
"discountDisplays": [
{
"displayName": "20% Off in Cart",
"discountAmount": 160.00
}
],
"lines": [
{
"lineGrossAmount": 800.00,
"lineSellerDiscount": 0.00,
"lineTyDiscount": 160.00,
"lineTotalDiscount": 160.00,
"lineUnitPrice": 640.00,
"discountDetails": [
{
"lineItemPrice": 640.00,
"lineItemSellerDiscount": 0.00,
"lineItemTyDiscount": 160.00
}
]
}
]
}5. Combined Discount (Seller + Trendyol)
When a seller campaign and a Trendyol coupon are both applied to the same order, both fields are populated.
{
"packageGrossAmount": 600.00,
"packageSellerDiscount": 60.00,
"packageTyDiscount": 50.00,
"packageTotalDiscount": 110.00,
"packageTotalPrice": 490.00,
"discountDisplays": [
{
"displayName": "10% Seller Discount",
"discountAmount": 60.00
},
{
"displayName": "50 TL Coupon",
"discountAmount": 50.00
}
],
"lines": [
{
"lineGrossAmount": 600.00,
"lineSellerDiscount": 60.00,
"lineTyDiscount": 50.00,
"lineTotalDiscount": 110.00,
"lineUnitPrice": 490.00,
"discountDetails": [
{
"lineItemPrice": 490.00,
"lineItemSellerDiscount": 60.00,
"lineItemTyDiscount": 50.00
}
]
}
]
}6. Multiple Quantities (quantity > 1)
When 2 units of the same product are ordered, discountDetails returns a separate entry for each unit. lineSellerDiscount is the sum of all items in that line.
{
"packageGrossAmount": 700.00,
"packageSellerDiscount": 70.00,
"packageTyDiscount": 0.00,
"packageTotalDiscount": 70.00,
"packageTotalPrice": 630.00,
"discountDisplays": [
{
"displayName": "10% Seller Discount",
"discountAmount": 70.00
}
],
"lines": [
{
"quantity": 2,
"lineGrossAmount": 350.00,
"lineSellerDiscount": 35.00,
"lineTyDiscount": 0.00,
"lineTotalDiscount": 35.00,
"lineUnitPrice": 315.00,
"discountDetails": [
{
"lineItemPrice": 315.00,
"lineItemSellerDiscount": 35.00,
"lineItemTyDiscount": 0.00
},
{
"lineItemPrice": 315.00,
"lineItemSellerDiscount": 35.00,
"lineItemTyDiscount": 0.00
}
]
}
]
}Updated 3 days ago