HomeGuidesAPI ReferenceChangelogSupport Request
Guides

7. Split Shipment Packages

Split Order Package Item

Use this method to spilt one or more item in Order Package.

  • You need to send "storeFrontCode" as Header Parameter.
  • Each order package has a ShipmentPackageId value. If one of the item is split in the package, the package status will be "Unpacked" automatically and new ShipmentPackageId will be generated and assigned to the new package. Therefore, you must get orders with this endpoint
  • The default value of "shouldKeepPreviousStatus" is "false". If you do not send this field, it will be marked as "false"
  • If you would like to keep the package status same, this field should be marked as "true", otherwise (if you send this field "false") new packages will be generated on "created" status.
  • If "shouldKeepPreviousStatus" field is false new packages will be in "created" status. If the old package status was picking, You should send "shouldKeepPreviousStatus" as true or you should send "picking" for the new package.

Dividing Order Packages with Multiple Barcodes

After using this service, new packages depending on the order number will be generated asynchronously. For this reason, you have to fetch the new generated packages from the Get Shipment Packages again.

With this method, you can process the products included in an order package with the quantity and orderLineId value of the relevant barcode in the package.

  • If there is a product(s) that you exclude while requesting, that product(s) will be created in a separate and new package.
flowchart LR

A["New package details are retrieved from the **getShipmentPackages** service or **Webhook** model (getShipmentPackages)"]
B["Split request is made (postSplitShipmentPackage)"]
C["Seller sends **cargoSenderNumber** and cargo **providerCode** for the new shipmentPackageIds (putUpdateTrackingNumber)"]
D["The current shipmentPackageIds gets invalid and its status is updated to **UnPacked**"]
E["New **shipmentPackageId** is generated under the same **orderNumber**"]
F{"What is cargo carrier agreement? **Trendyol Pays** or **Seller Pays**?"}
G["Seller can receive package status updates via **getShipmentPackages **service or **Webhook** model. (getShipmentPackages)"]
H["New package details are retrieved from the **getShipmentPackages** service or **Webhook** model (getShipmentPackages)"]
I["Split request is made (postSplitShipmentPackage)"]
J["The current shipmentPackageIds gets invalid and its status is updated to **UnPacked**"]
K["New **shipmentpackageid** and **cargoTrackingNumber** are generated under the same **ordernumber**"]

F -->|Trendyol Pays| I
I --> J
J --> K
K --> H
H --> G
B --> D
D --> E
E --> C
A --> G
C --> A
F -->|Seller Pays| B

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

POST splitMultiPackageByQuantity

Sample Service Request


{
  "splitPackages": [
    {
      "packageDetails": [
        {
          "orderLineId": 12345,
          "quantities": 2
        },
        {
          "orderLineId": 123456,
          "quantities": 1
        }
      ]
    },
    {
      "packageDetails": [
        {
          "orderLineId": 123,
          "quantities": 1
        },
        {
          "orderLineId": 1234,
          "quantities": 1
        }
      ]
    }
  ],
  "shouldKeepPreviousStatus": true
}

POST splitShipmentPackage

Sample Service Request

{
  "orderLineIds": [{orderLineId}]
  "shouldKeepPreviousStatus": true
}

Split Order Package Item ( Creating Multiple Packages with a Single Request )

After using this service, new packages depending on the order number will be generated asynchronously. For this reason, you have to fetch the new generated packages from the Get Shipment Packages again.

POST splitShipmentPackage

Sample Service Request

In this example, there will be 3 packages; First ,one package for 3,5,6 orderLines in the package. Second, another package for 7,8,9 orderLines, and third, one package for the remaining orderLines.

  • All orderLines in a package should not be sent to this service. The final package for the remaining orderlines will be created by the system automatically.
{
	"splitGroups": [{
			"orderLineIds": [
				3, 5, 6
			]
		},
		{
			"orderLineIds": [
				7, 8, 9
			]
		}

	],
  "shouldKeepPreviousStatus": true
}

Split Order Packages Based On Barcode

After using this service, new packages depending on the order number will be generated asynchronously. For this reason, you have to fetch the new generated packages from the Get Shipment Packages again.

POST splitShipmentPackageByQuantity

Sample Service Request

{
  "quantitySplit": [
    {
      "orderLineId": 0,
      "quantities": [
       2,2
      ]
    }
  ],
  "shouldKeepPreviousStatus": true
}