HomeGuidesAPI ReferenceChangelogSupport Request
Guides

Split Order Package Item (splitShipmentPackage)

Split Order Package Item

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

  • Each order package has a shipmentPackageId value. If one of the item is split in the package,the package status will be "Unpack" automatically and new shipmentPackageId will be generated and assigned tothe new package. Therefore, you must get orders with this endpoint.
flowchart LR

A["Seller updates status to **Picking** (putUpdatetPackage)"]
B["Seller updates status to **Invoiced** (optional) (putUpdatetPackage)"]
C["Shipment is completed with existing **shipmentPackageId** and **cargoTrackingNumber**"]
D{"Will the package be split? (**shipmentpackageId**)"}
E["Package is created"]
F["Split request is made (postSplitShipmentPackage)"]
G["The current shipment package id gets invalid and its status is updated to **UnPacked**"]
H["New package details are retrieved from the **getShipmentPackage** service or checked via **Webhook** model (getShipmentPackages)"]
I["New **shipmentpackageid** and **cargoTrackingNumber** are generated under the same **ordernumber**"]

E --> D
D -->|NO| A
D -->|YES| F
A --> B
F --> G
G --> I
I --> H
H --> D
B --> C

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

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 getShipmentPackages 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.

POST splitMultiPackageByQuantity

Sample Service Request


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

POST splitShipmentPackage

Sample Service Request

{
  "orderLineIds": [{orderLineId}]
}

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 getShipmentPackages 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
			]
		}

	]
}

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 getShipmentPackages again.

POST splitShipmentPackageByQuantity

Sample Service Request

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