Important
New shipment package stream endpoint is available

For large-scale scanning and synchronization flows, please prefer getShipmentPackagesStream.

HomeGuidesAPI ReferenceChangelogSupport Request
Guides

15. 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: lineItemSellerDiscount represents the discount covered by the seller, while lineItemTyDiscount represents 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.

FieldDescription
packageGrossAmountTotal gross amount (before discounts)
packageSellerDiscountTotal seller discount
packageTyDiscountTotal Trendyol discount *
packageTotalDiscountTotal discount (Seller + TY)
packageTotalPriceNet amount payable (includes SGR fee when applicable)
totalSgrFeeTotal SGR fee for the package **
discountDisplays[]Campaign names and discount amounts
  • packageTyDiscount may be populated only for commercial=true (B2B) orders.

** totalSgrFee is only present on Romania non-micro international orders. It is a fee, not a discount — it increases the payable amount.

Line Level — lines[]

Per-product unit totals.

FieldDescription
lineGrossAmountUnit gross price (before discounts)
lineSellerDiscountSeller discount (sum of items)
lineTyDiscountTY discount (sum of items)
lineTotalDiscountTotal unit discount
lineSgrFeeSGR fee per unit (Romania non-micro orders only)
lineUnitPriceNet unit price (includes lineSgrFee when applicable)

Item Level — discountDetails[]

Separate discount entry per unit. For a line with quantity=N, discountDetails returns an array of N elements.

FieldDescription
lineItemPriceNet price = Gross − Seller − TY
lineItemSellerDiscountSeller discount applied to this item
lineItemTyDiscountTrendyol 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
        }
      ]
    }
  ]
}

International Orders — SGR Fee

What is SGR Fee? SGR (Selective Recycling Fee) is an environmental/recycling surcharge applied to Romania non-micro international orders. Unlike discounts, it is a fee added on top of the net price — it increases the amount payable.

Extended net price formula for these orders: lineUnitPrice = lineGrossAmount − lineSellerDiscount − lineTyDiscount + lineSgrFee

7. Romania Order with SGR Fee

A non-micro Romania international order where totalSgrFee and lineSgrFee are present. Note that lineUnitPrice is higher than lineGrossAmount − discounts because the SGR fee is added on top.

{
  "packageGrossAmount": 300.00,
  "packageSellerDiscount": 30.00,
  "packageTyDiscount": 0.00,
  "packageTotalDiscount": 30.00,
  "packageTotalPrice": 286.00,
  "totalSgrFee": 16.00,
  "discountDisplays": [
    {
      "displayName": "10% Seller Discount",
      "discountAmount": 30.00
    }
  ],
  "micro": false,
  "lines": [
    {
      "quantity": 2,
      "lineGrossAmount": 150.00,
      "lineSellerDiscount": 15.00,
      "lineTyDiscount": 0.00,
      "lineTotalDiscount": 15.00,
      "lineSgrFee": 8.00,
      "lineUnitPrice": 143.00,
      "discountDetails": [
        {
          "lineItemPrice": 135.00,
          "lineItemSellerDiscount": 15.00,
          "lineItemTyDiscount": 0.00
        },
        {
          "lineItemPrice": 135.00,
          "lineItemSellerDiscount": 15.00,
          "lineItemTyDiscount": 0.00
        }
      ]
    }
  ]
}

Note: lineSgrFee is the total SGR fee per item in that line. totalSgrFee at the package level reflects the total SGR fee across all lines. discountDetails does not include SGR fee — it only covers discount fields. totalSgrFee and lineSgrFee are omitted entirely when not applicable (domestic and micro international orders).