Back

Search

Search

Methods

Inventory

OrderPrintStatus
Orders

Orders /RecalculateSingleOrderPackaging

Allows 150 calls per minute

Response: CalcOrderHeader



Designed to recalculate order packaging totals based on the object provided

Parameters

NameTypeDescription
requestCalcOrderHeaderRequest object with data needed
cancellationTokenCancellationToken

Permissions

GlobalPermissions.OrderBook.ViewOrderDetailsNode

Example Request

The following request format is required for this method.

Endpoint URL

GET | POST https://eu-ext.linnworks.net/api/Orders/RecalculateSingleOrderPackaging

Headers

Connection: keep-alive
Accept: application/json
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

Request Body

This is an example of the request structure. Results will vary depending on your data.

request={
  "pkOrderID": "7ac0ed00-21ed-441f-a4f9-e46f855b059f",
  "nOrderId": 2,
  "fkPostalServiceId": "3114c79c-43f0-4e16-868a-d2afba33c436",
  "fkCountryId": "587a19a9-f78f-408d-b852-59e34a796751",
  "cCountry": "sample string 5",
  "ItemWeight": 6.0,
  "fkPackagingGroupId": "890f06c0-89db-45bb-b305-e8a37f8a7504",
  "fkPackagingTypeId": "718915d4-a4ec-4d0e-8d28-4f245b54b50f",
  "IsSplitPackaging": false,
  "PackagingWeight": 9.0,
  "TotalWeight": 10.0,
  "TotalWidth": 1.0,
  "TotalHeight": 1.0,
  "TotalDepth": 1.0,
  "ManualAdjust": true,
  "CanAutoSplit": false,
  "IsAutoSplit": false,
  "SplitPackageCount": 13,
  "LabelPrinted": true,
  "CalculationHints": [
    "sample string 1"
  ],
  "Items": [
    {
      "fkStockItemId": "b1def5d1-d8d1-41c5-925c-b0424cede92b",
      "fkOrderItemId": "f7726d3e-3f10-4a78-a501-266a6279cb7f",
      "StockItemIntId": 3,
      "SKU": "sample string 4",
      "nQty": 5,
      "ItemWeight": 6.0,
      "DimHeight": 7.0,
      "DimWidth": 8.0,
      "DimDepth": 9.0,
      "PackageGroup": "25361d21-842e-416d-a345-236861d2b263",
      "fkCompositeParentRowId": "5740ce69-aa89-4980-bb00-d6a7d1bc0af3",
      "IsCompositeChild": true,
      "Boxes": [
        {
          "BoxId": 1,
          "StockItemIntId": 2,
          "BoxName": "sample string 3",
          "Width": 4.0,
          "Height": 5.0,
          "Length": 6.0,
          "Weight": 7.0,
          "ValuePercentage": 8.0,
          "Barcode": "sample string 9",
          "PackagingTypeId": "cf663125-ffc3-471d-9d9a-a9d331c53fd3",
          "LogicalDelete": true
        }
      ]
    }
  ],
  "Bins": [
    {
      "pkBinId": "17023a55-83b6-46ca-a0bd-76c7a9aeb1fb",
      "TrackingNumber": "sample string 2",
      "LabelId": "sample string 3",
      "Weight": 1.0,
      "PrintDate": "2023-01-10T13:49:45.7387878+00:00",
      "Cost": 1.0,
      "fkPackagingTypeId": "25775e92-dbf7-4c10-9d31-cfa60e4a7d81",
      "Width": 1.0,
      "Height": 1.0,
      "Depth": 1.0,
      "PackagingWeight": 1.0,
      "ItemWeight": 1.0,
      "ManualAdjust": true,
      "Items": [
        {
          "ShippingOrderItemId": 1,
          "BinId": "f0c5493a-2915-4f09-b8dc-1207d07fbf40",
          "fkOrderItemId": "39801a5c-c185-4bf4-a244-357c4f90dfa5",
          "BoxId": 1,
          "Quantity": 4
        }
      ]
    }
  ],
  "ThreeDimPackaging": {
    "TotalPackages": 1,
    "Packages": [
      {
        "PackagingId": "353c4f46-4a97-4126-978c-ec92596f5aca",
        "Width": 2.1,
        "Height": 3.1,
        "Depth": 4.1,
        "ItemWeight": 5.0,
        "PackagingWeight": 6.0,
        "Faces": [
          {
            "TopLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "TopRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            }
          }
        ],
        "Items": [
          {
            "ID": "7c5cbd5f-e22b-4c29-a21a-293e3c42fe34",
            "PkStockItemId": "82eb4b41-2984-4591-ae3d-a59deeac1363",
            "SKU": "sample string 2",
            "Width": 3.1,
            "Height": 4.1,
            "Depth": 5.1,
            "Weight": 6.0,
            "X": 7.1,
            "Y": 8.1,
            "Z": 9.1,
            "Layer": 10,
            "Faces": [
              {
                "TopLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "TopRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                }
              }
            ]
          }
        ],
        "LayerCount": 7,
        "LayerFace": {
          "1": {
            "TopLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "TopRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            }
          }
        },
        "IsManualPackage": true
      }
    ],
    "UnpackedItems": {
      "106d7017-4648-4411-a7e4-e2fc5d242995": 2
    }
  },
  "DimMethod": 0
}&cancellationToken={
  "IsCancellationRequested": false,
  "CanBeCanceled": false,
  "WaitHandle": {
    "Handle": {
      "value": 1292
    },
    "SafeWaitHandle": {
      "IsInvalid": false,
      "IsClosed": false
    }
  }
}

Response

This is an example of the response JSON. Results will vary depending on your data.

{
  "pkOrderID": "0daf87f0-7887-4d6b-a2d7-1d12fdcab1a6",
  "nOrderId": 2,
  "fkPostalServiceId": "a75dec7b-b07d-4e47-a687-55c36f257203",
  "fkCountryId": "6585a50a-ebb3-4dd6-b7b5-22796ea784ec",
  "cCountry": "sample string 5",
  "ItemWeight": 6.0,
  "fkPackagingGroupId": "fedca54b-46b0-4579-9fe6-5f1fa7e223c8",
  "fkPackagingTypeId": "b6ede9a4-c8d5-4732-a4df-5592bc6f9cc7",
  "IsSplitPackaging": false,
  "PackagingWeight": 9.0,
  "TotalWeight": 10.0,
  "TotalWidth": 1.0,
  "TotalHeight": 1.0,
  "TotalDepth": 1.0,
  "ManualAdjust": true,
  "CanAutoSplit": false,
  "IsAutoSplit": false,
  "SplitPackageCount": 13,
  "LabelPrinted": true,
  "CalculationHints": [
    "sample string 1"
  ],
  "Items": [
    {
      "fkStockItemId": "26c8c876-a484-4c9c-b0d5-d3a28c9d9f0e",
      "fkOrderItemId": "7b6b0687-394f-4f87-943e-134cf84e49aa",
      "StockItemIntId": 3,
      "SKU": "sample string 4",
      "nQty": 5,
      "ItemWeight": 6.0,
      "DimHeight": 7.0,
      "DimWidth": 8.0,
      "DimDepth": 9.0,
      "PackageGroup": "356bd2f7-36ad-4467-a76a-ff9a303cbefe",
      "fkCompositeParentRowId": "a04ec134-1044-4955-8e5c-3fce916cfac4",
      "IsCompositeChild": true,
      "Boxes": [
        {
          "BoxId": 1,
          "StockItemIntId": 2,
          "BoxName": "sample string 3",
          "Width": 4.0,
          "Height": 5.0,
          "Length": 6.0,
          "Weight": 7.0,
          "ValuePercentage": 8.0,
          "Barcode": "sample string 9",
          "PackagingTypeId": "bbf1769a-9347-4b66-885c-51d84b87be7a",
          "LogicalDelete": true
        }
      ]
    }
  ],
  "Bins": [
    {
      "pkBinId": "cb254904-b05e-4907-9d3c-a01df9ef8cc1",
      "TrackingNumber": "sample string 2",
      "LabelId": "sample string 3",
      "Weight": 1.0,
      "PrintDate": "2023-01-10T13:49:54.2104454+00:00",
      "Cost": 1.0,
      "fkPackagingTypeId": "ef682842-f31f-4d7d-b63b-dbb647aea889",
      "Width": 1.0,
      "Height": 1.0,
      "Depth": 1.0,
      "PackagingWeight": 1.0,
      "ItemWeight": 1.0,
      "ManualAdjust": true,
      "Items": [
        {
          "ShippingOrderItemId": 1,
          "BinId": "d669dec6-730f-41f7-9870-bf7667340079",
          "fkOrderItemId": "e0a14bea-1c9a-4c58-b2d0-19b02d320629",
          "BoxId": 1,
          "Quantity": 4
        }
      ]
    }
  ],
  "ThreeDimPackaging": {
    "TotalPackages": 1,
    "Packages": [
      {
        "PackagingId": "896fd1b6-5caa-406c-b717-48910fe0dcd3",
        "Width": 2.1,
        "Height": 3.1,
        "Depth": 4.1,
        "ItemWeight": 5.0,
        "PackagingWeight": 6.0,
        "Faces": [
          {
            "TopLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "TopRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            }
          }
        ],
        "Items": [
          {
            "ID": "b1a5ce27-3404-4ddb-a3c8-ab2db1e5c151",
            "PkStockItemId": "aac32de5-3325-4ed3-9a42-1d718cfdb43f",
            "SKU": "sample string 2",
            "Width": 3.1,
            "Height": 4.1,
            "Depth": 5.1,
            "Weight": 6.0,
            "X": 7.1,
            "Y": 8.1,
            "Z": 9.1,
            "Layer": 10,
            "Faces": [
              {
              }
            ]
          }
        ],
        "LayerCount": 7,
        "LayerFace": {
          "1": {
          }
        },
        "IsManualPackage": true
      }
    ],
    "UnpackedItems": {
      "f2940683-128a-41d0-adf3-3fea0949a256": 2
    }
  },
  "DimMethod": 0
}