Retrieval Order Packages (getShipmentPackages)

Retrieval Order Packages

You can use this method to get the information of the products you have sent to the Trendyol system and every order given by the customer after the planned boutique Orders placed by customers on Trendyol.com are automatically packed by the system and created order packages. This means that you can get more than one shipmentPackageID in response to one orderNumber you have installed.

You can use orders with "Awaiting" status for only stock transactions. You should not take any other action regarding orders with this status. At the moment, the necessary data is transmitted to you in the service response for orders with this status. These data will not be returned to you in the coming days.
We would like to point out that if you deliver the orders with this status to cargo, the order cancellation transactions that may occur may occur and as Trendyol we do not accept any responsibility.

NOTE 1: The orderNumber value when the order data is received corresponds to the main order number of the order Trendyol system in that order. The id value at the same level represents the Order Package created for that order number.

NOTE 2: One or more items are canceled in any order package, the order package will be distorted and a new id value and cargo barcode will be created provided that the orderNumber is automatically maintained by the system.

NOTE 3: Packaging and processing should be done according to the barcode value sent with product create products when ordering information.

NOTE 4: If a customer gets more than one boutique at Trendyol.com, more than one package can be created under the same orderNumber. For this reason, whenever an enhancement is made, an orderNumber must always be processed with more than one id (packageid).

NOTE 5: suppliers/xxxx/orders?status=Created it is possible to query according to the packet statues with a query.Statutory that can be used: Created, Picking, Invoiced, Shipped, Cancelled, Delivered, UnDelivered, Returned, Repack, UnPacked, UnSupplied.

NOTE 6:

In the amount field, the price of each of the two barcode product "barcode1234" taken before the discount is listed.

In the discount field, the average discount amount corresponding to each of the two barcode product "barcode1234" received is listed. (It is recommended that our vendors who display pen discount when invoicing not use this field. Check lineItemDiscount field.)

In the price field, the price after the average discount corresponding to each of the 2 purchased "barcode1234" barcode products is listed. (It is recommended that our sellers who display pen discount when invoicing not use this field. Check the listItemPrices field.)

The lineItemPrices field lists the actual price after the discount corresponding to each of the products with the barcode "barcode1234".

The lineItemDiscounts field lists the actual discount amount corresponding to each of the products with the barcode "barcode1234" as a list.

NOTE 7: When fetching the cancelled orders, you can add status=Canceled,UnSupplied parameter.

NOTE 8: When fetching the split orders, you can add status=UnPacked parameter.

  • GET getShipmentPackages

https://api.trendyol.com/sapigw/suppliers/{supplierid}/orders

NOTE: If you do not use any parameter in the endpoint above, it returns you maximum one week order instead of all orders.
If you use startDate and endDate parameters, the maximum allowable range is two weeks.

  • Recommended Endpoint

https://api.trendyol.com/sapigw/suppliers/{supplierid}/orders?status=Created&startDate={startDate}&endDate={endDate}&orderByField=PackageLastModifiedDate&orderByDirection=DESC&size=50

Parameter Parameter Value Explanation Type
startDate It fetches the next orders from a specific date. Must be sent as Timestamp long
endDate It fetches orders up to the specified date. Must be sent as Timestamp. long
page Only return information on the specified page int
size Specifies the maximum number to list on a page. int
supplierId ID information of the relevant supplier should be sent long
orderNumber Only a specific order number is given to bring that order's information string
status Created, Picking, Invoiced, Shipped, Cancelled, Delivered, UnDelivered, Returned, Repack, UnSupplied Fetchs the information according to the status of orders. string
orderByField PackageLastModifiedDate Based on the last update date. string
orderByField CreatedDate Based on the order creation date. string
orderByDirection ASC Sorts from old to new. string
orderByDirection DESC Sorts from new to old. string
shipmentPackageIds Trendyol shipmentPackageIds long

Sample Service Response

{
    "page": 0,
    "size": 50,
    "totalPages": 1,
    "totalElements": 1,
    "content": [
        {
            "shipmentAddress": {
                "id": 80844024,
                "firstName": "Trendyol",
                "lastName": "Müşterisi",
                "address1": "DSM Grup Danışmanlık İletişim ve Satış Tic. A.Ş. Büyükdere Caddesi Noramin İş Merkezi No:237 Kat:B1 ",
                "address2": "",
                "city": " İstanbul ",
                "cityCode": 34,
                "district": "Şişli",
                "districtId": 54,
                "postalCode": "10D",
                "countryCode": "TR",
                "fullName": "Trendyol Müşterisi",
                "fullAddress": "DSM Grup Danışmanlık İletişim ve Satış Tic. A.Ş. Büyükdere Caddesi Noramin İş Merkezi No:237 Kat:B1   Şişli  İstanbul "
            },
            "orderNumber": "80869231",
            "grossAmount": 51.98,
            "totalDiscount": 25.99,
            "totalPrice": 25.99,
            "taxNumber": null,
            "invoiceAddress": {
                "id": 80844023,
                "firstName": "Trendyol",
                "lastName": "Müşterisi",
                "company": "",
                "address1": "DSM Grup Danışmanlık İletişim ve Satış Tic. A.Ş. Büyükdere Caddesi Noramin İş Merkezi No:237 Kat:B1 ",
                "address2": "",
                "city": " İstanbul ",
                "district": "Şişli",
                "postalCode": "",
                "countryCode": "TR",
                "fullName": "Trendyol Müşterisi",
                "fullAddress": "DSM Grup Danışmanlık İletişim ve Satış Tic. A.Ş. Büyükdere Caddesi Noramin İş Merkezi No:237 Kat:B1   Şişli  İstanbul "
            },
            "customerFirstName": "Trendyol",
            "customerEmail": "[email protected]",
            "customerId": 99993706,
            "customerLastName": "Müşterisi",
            "id": 11650604, ~~   shipmentPackageId   ~~
            "cargoTrackingNumber": 7340447182689,
            "cargoTrackingLink": "https://kargotakip.trendyol.com/?token="
            "cargoSenderNumber": "733861966410",
            "cargoProviderName": "Trendyol Express Marketplace" 
            "lines": [
                {
                    "quantity": 2,
                    "productId": 67984887,
                    "salesCampaignId": 201642,
                    "productSize": " one size",
                    "merchantSku": "merchantSku",
                    "productName": "Kadın Çivit Mavi Geometrik Desenli Kapaklı Clutch sku1234 sku1234, one size",
                    "productCode": 11954798,
                    "merchantId": 201,
                    "amount": 25.99,
                    "discount": 13.00,
                    "price": 12.99,
                    "discountDetails": [
                        {
                        "lineItemPrice": 13.00,
                        "lineItemDiscount": 12.99
                        },
                        {
                        "lineItemPrice": 12.99,
                        "lineItemDiscount": 13.00
                        }
                    ],
                    "currencyCode": "TRY",
                    "productColor": "No Color",
                    "id": 56040534,  ~~   orderLineId   ~~
                    "sku": "sku1234",
                    "vatBaseAmount": 8,
                    "barcode": "barcode1234",
                    "orderLineItemStatusName": "ReturnAccepted"
                }
            ],
            "orderDate": 1542801149863,
            "tcIdentityNumber": "99999999999",
            "currencyCode": "TRY",
            "packageHistories": [
                {
                    "createdDate": 1542790350607,
                    "status": "Created"
                },
                {
                    "createdDate": 1543789070462,
                    "status": "Delivered"
                },
                {
                    "createdDate": 1542872460911,
                    "status": "Picking"
                },
                {
                    "createdDate": 1542953901874,
                    "status": "Shipped"
                }
            ],
            "shipmentPackageStatus": "ReturnAccepted"
        }
    ]
}
Service Definition
orderDate When the customer creates the order on trendyol.com.
Awaiting It returns when the payment is waiting the confirm. (You should not take any action until these orders with this status change to "Created" status. You can use this status only for stock updates.)
Created When the payment confirm accepted it returns when the order is ready for shipment.
Picking It is a status that can be communicated by you. You can forward it when you start collecting the order or when you start preparing the package.
Invoiced This is the status that you can forward to us when you make out an invoice.
Shipped Orders that move into transport status are specified in this status.
Cancelled Orders that cancelled.
UnPacked Orders that splitted.
Delivered Orders that delivered.
UnDelivered It returns when the order cannot be delivered to the customer.
UnDeliveredAndReturned It returns that the order that does not delivered the customer is returned to the supplier.

NOTE : You can distinguish the cargo company name from the first 3 digits of the number in the "cargoTrackingNumber" field in the response of the order service. You can reach the related values from the table below.

Cargo Company First 3 Digits Number
Trendyol Express 733
Yurtiçi Kargo 725
Aras Kargo 726
Sürat Kargo 727
MNG Kargo 728
UPS Kargo 729
Alternatif Teslimat 732
PTT Kargo 734
Horoz Lojistik 984